The Supreme Court yesterday rejected part of the government's scheme for controlling natural gas prices, an action that officials said could cost consumers $2 billion.

The court said the Federal Energy Regulatory Commission placed too low a ceiling on the rates for much of the gas produced by interstate pipeline companies. Higher ceilings, such as those allowed independent producers, should be permitted, the court said in a 5-to-4 decision based on its reading of Congress' intent in the 1978 Natural Gas Policy Act.

The court rejected the government's contention that such a ruling would provide a "windfall" for the interstate pipeline companies.

The amount of gas affected by the ruling represents about 5 percent of the nation's total production, according to the government. The price per thousand cubic feet for that gas could now double, triple or even quadruple under the complicated regulatory formula, according to Frederick Moring, who opposed yesterday's decision on behalf of eastern seaboard gas distributors.

Those distributors, including Washington Gas Light Co. and Baltimore Gas and Electric Co., purchase their natural gas from interstate pipeline companies.

Some of the price increase has been factored into consumers' bills since a lower court ruled in favor of the pipeline companies in 1981.

Columbia Gas Transmission Corp., the Washington area's principal pipeline supplier of natural gas, repriced its own gas production beginning last September, a spokesman said.

Yesterday's case stemmed from the 1978 congressional overhaul of the nation's natural gas price controls occasioned by the energy crisis. It also grew out of confusion about the extent to which the National Gas Policy Act supplanted the old controls required under the Natural Gas Act.

The new act was designed, in part, to correct supply imbalances caused by the "dual market" for natural gas under which interstate, but not intrastate, gas was subject to heavy price controls. The old system gave independent producers an incentive to sell only within their states at higher prices. It was also thought to be a disincentive to exploration for the interstate market.

Under the Natural Gas Policy Act, new, higher ceilings were allowed for the "first sale" of most gas by independent producers for interstate use. Interstate pipeline companies, in addition to pumping gas they buy from the independents, also produce some of their own gas.

Higher prices were allowed for some of the pipeline produced gas--newly discovered gas--but FERC interpreted the law as requiring the maintenance of the old, lower price ceilings for the rest under the earlier Natural Gas Act.

It reasoned that higher ceilings were not necessary to encourage interstate pipelines to supply fuel for the rest of the country.

Finally, the government said there was no "first sale" of that gas, as the act defines it, since the pipelines already owned it and could only sell it to themselves before distributing it to its customers.

The Mid-Louisiana Gas Co., joined by other pipeline firms, successfully challenged FERC's rules before the 5th U.S. Circuit Court of Appeals. The government, along with state regulatory authorities in New York and Michigan arguing that the ruling intefered with state rate-setting authority, appealed to the Supreme Court, which affirmed the lower court yesterday.

Justice John Paul Stevens, writing for the court yesterday, said Congress did not intend the exclusion of the pipeline production from the act's coverage. The categories covered, he said, "are defined on the basis of the type of well and the past uses of its gas, not on the basis of who owns the well."

Justice Byron R. White, joined by Justices William J. Brennan Jr., Thurgood Marshall and Harry A. Blackmun, dissented. White said the court should have deferred to FERC's interpretation, which was "undeniably supportable" under the law. "I can recall no similar case in which we have overturned an agency's interpretation," White said.