The Carter administration's wage-restraint policy passed its first test early today as unionized oil refinery workers agreed to a new two-year contract that conforms to the government's pay guidelines.

The Denver-based Oil, Chemical and Atomic Workers (AFL-CIO) announced it had accepted a contract offer from Gulf Oil Co. Presumably this sets apattern for the rest of the oil industry and averts a strike by the 60,000 members of the union.

Government sources had predicted that the negotiations could, as one official put it, "be wrapped up in a matter of few days -- within the guidelines."

The oil negotiations, although they involve only 60,000 workers and an industry with low labor costs, are viewed as significant because they constitute the first major test of the administration's 7 percent wage increase guideline.

New offers -- first from Gulf and then from Standard Oil of Indiana (Amoco) -- appeared to meet at least some of the conditions laid down by the Denver-based Oil, Chemical and Atomic Workers Union Wednesday asit rejected all pending offers and called for new bids from the industry.

Gulf and the union agreed on a wage in crease of 73 cents per hour the first year, amounting to 8 percent, and a 5 percent increase for the second year that could be expanded in a reopening of negotiations for wages and benefits next January.

This falls within the administration's proposed ceiling of an average of 7 percent over two years.

OCAW President A. F. Grospiron said this morning that "following action of the policy committee, I have approve an offer from Amoco which conforms with the pattern settlement.

Grospiron said Wednesday he wanted "a number of offers from the oil companies" so that an industrywide pattern would be assured.

An earlier proposed pattern-setter from Amoco, which also provided 73 cents the first year and a wage reopener for the second year but froze wages for entry-level workers, was rejected after the government refused to give it advance sanction as a model for all companies.

An earlief Gulf offer of 8 and 6 percent over two years had been rejected. The union had stipulated that it wanted the offer in cents-per-hour terms, not percentages.

At least two other oil compaines, Atlantic Richfield and Marathon, were reportedly drafting proposals along the new Gulf-Amoco lines. Others said they would be making offers shortly.

The union has been working without a contract since midnight Sunday, when its previous pacts expired. It has been reluctant to strike, in part because the industry is so heavily automated that refineries can operate for long periods with only supervisory personnel.