The Carter administration reached an import controls agreement with the textile and apparel industries yesterday that is expected to remove a major obstacle to eventual approval of a new world trade pact.

The agreement commits the two politically powerful industries to support the administration's anti-inflation and trade programs, presumably including the trade pact, industry officials said.

More important immediately, both government and industry sources said it means the two industries will not oppose prompt congressional adoption of a bill that foreign countries have been demanding as a condition for wrapping up the trade pact now nearing completion in Geneva.

This bill, which would authorize continued waiving of penalty (countervailing) duties on subsidized imports pending completion of the trade pact, has been held up in the House Ways and Means trade subcommittee until the textile and apparel industry problems were resolved. The subcommittee is now scheduled to act on the measure Tuesday.

The textile and apparel industries had been threatening to thwart congressional action on the waiver bill in order to win concessions they deemed necessary to protect themselves from cut-rate imports -- and last night they indicated that the concessions were sufficient.

The agreement, climaxing weeks of negotiations between trade representative Robert S. Strauss and top management and labor officials from both industries, seeks to restrict periodic "surges" of imports within existing overall quotas. It envisions limits on certain categories of imports that jeopardize vulnerable American ndustries and a mechanism for continual assessing of the cumulative effect of all textile and apparel imports so redress can be sought when they begin to hurt domestic production. The agreement also envisions government support for export expansion efforts.

The agreement encountered resistance from within the administration, including objections from economists that it would contribute to inflation and some last-minute questions raised by the State Department that were resolved by Strauss before his final meeting late yesterday with the industry officials. The agreement was not changed, however, from the form that President Carter approved before leaving for Mexico on Wednesday, officials said.

"I think the president will be pleased we are able to sign off on a document that the government basically supports," Strauss said. "I think what we've done is balance the concerns of consumers, problems of inflation and employment and the needs of a very large and sensitive industry."

Industry officials quickly expressed their public support.

While industry officials denied that the import restraints will be inflationary and noted their support for the administration's anti-inflation program, some administration economists believe the restraints will lead to higher costs by limiting the flow of lower-priced goods into this country.