The United Steelworkers union overwhelmingly approved a new contract yesterday that will boost labor costs in the nation's basic steel industry by at least one-third over the next three years.

The new agreement appears, however, to be in compliance with the Carter administration's voluntary wage guidelines. Under the White House anti-inflation program, the union is allowed wage and benefit increases of 31.3 percent.

Although actual costs under the contract may go higher than the guidelines permit, a major cost item to the industry -- improved pension benefits to retired workers -- is exempt from the guidelines.

Neither steel industry officials nor representatives of the Council on Wage and Price Stability would publicly comment yesterday on the new agreement. Privately, however, both the industry and the government expressed concern the settlement would force future price increases in the industry.

The nation's steel industry has been losing ground in recent years to import competition in domestic markets, forcing plant closings and thousands of layoffs in the past year.

Union representatives yesterday expressed satisfaction with the contract. "It's the richest in the history of the union," said USW Vice President Joseph Odorcich, according to the Associated Press.

The contract was approved on a 333-42 vote by the union's ratifying committee, which met in Pittsburgh. Basically, the contract calls for:

A 25 cent-an-hour wage increase the first year, a 20-cent hourly pay raise the second, and a 15-cent hourly pay increase the third year.

Maintenance of the union's current cost-of-living adjustment benefits which, according to union spokesmen, would add about $2.60 more to the hourly wage at the end of the third year.

Sacrificing cost-of-living benefits due next month to help pay for improved pension benefits.

Raising the pensions of workers who retired before 1965 to $12 monthly for each year of work -- effectively doubling pension benefits for some retirees.

Pegging pension benefits for workers who retired after 1965 to increases in the consumer price index.

The contract between the United Steelworkers and the Coordinating Committee Steel Companies, representing the nation's nine largest steel firms, covers an estimated 285,000 smaller companies employing nearly 170,000 workers are expected to follow the coordinating committee's lead.

The contract talks, which began last February, were conducted under the guidelines of the industry's 1973 Experrimental Negotiating Agreement, the most important provision of which bans national strikes or lockouts.

The ENA requires labor and management parties to submit unresolved disputes to an arbitration panel which would be empowered to make a final decision.

In exchange for the no-strike agreement, the industry guaranteed 3 percent wage increases at the beginning of each contract year, subject to additional increases which might be negotiated.

Under ENA, the industry also agreed to give each employe a $150 bonus "because (of) economic advantages (that) could accrue to the companies' by eliminating strike shutdowns and the product stockpiling done by some companies in anticipation of strikes.

Before and during the latest contract talks, there was much speculation that the steel companies would fight to get rid of ENA, because of its expense. However, one source close to the negotiations said yesterday that the ENA question "has been left hanging in the air for the time being."

The basic steel contract settlement, which replaces a pact expiring Aug. 1, is important to other major industry agreements ending in the next few months. The steel industry, because of its important position in the national economy, is often the wage settlement pattern setter for key manufacturers.

Groups which may attempt to follow steel's lead include nearly 700,000 employes of the American Telephone and Telegraph Co., whose contracts expire Aug. 9, and 42,000 workers for the nation's three largest aluminum producers -- Aluminum Co. and Reynolds Metal Co.

Agreements with The Big Three aluminum companies are scheduled to end May 31.