The United States and China, after months of sometimes stormy negotiations, have agreed in principle to a three-year bilateral trade pact to control the burgeoning imports of textiles and apparel from the Asian nation.

The agreement, scheduled to be signed next week, applies to cotton, wool and man-made textiles and apparel exported from China into the United States between Jan. 1. 1980, and Dec. 31, 1982, according to terse statements released by the office of the U.S. Trade Representative.

The agreement estblished import levels on certain women's, girls' and infants' knit and woven shirts and blouses, men's and boys' woven shirts and all cotton trousers and man-made fiber sweaters, a spokesman for the trade representative said.

Government officials refused to give any details of the agreement, which is another step in normalization of relations between the two countries. But one source said that import levels were much greater than those imposed after the textile talks broke down last year.

Domestic textile industry officials, who said they were pleased with the proposed agreement, had been concerned about the giant leaps Chinese goods were making in the U.S. market since 1970, when the only Chinese textile import was an 11-square-yard piece of wool carpet, one government official said.

The Chinese are this country's second-largest supplier of some cotton year the Chinese exported into the United States 231.2 million square yards of textiles and related products, up from 84.7 million square yards in 1974 and 163,000 square yards in 1979, an official said.

"We're satisfied," said Murray H. Finley, president of the Clothing and Textile Workers Union. "We think they did a good job," he said of the American negotiators.

"Imports, as you know, with us are a serious problem," Finley continued, adding that "Our concern with China is the potential . . . . The danger wasn't 1980.

One negotiating obstacle, Finley said, was that the Chinese wanted import limits set extremely high and complained because they had shipped goods here that were brought by U.S. merchants before last year's quotas were set. Those goods, however, surpassed the quotas and were piling up in warehouses and at docks. Finley said.

The agreement included the resolution of what limits would apply to those goods, a government official said.

Another dispute was whether the level of imports from China would be based on its historical level of textile exports to the United States.