THE GREAT DEBATE over natural-gas prices has now - we hope - finally ended. It was a surly and unenlightening affair, bringing out the worst in the Senate. The present compromise is due neither to presidential leadership, which was largely absent, nor to the legislative genius of the conferring senators, which was not greatly in evidence. On the contrary, a settlement was finally forced by the weight of growing public dismay at the senators' inability to come to a decision on a subject of manifest importance.

The central issue was simply whether to continue federal controls on gas prices - the policy that has produced an endemic gas shortage in all states except those in which the wells are located. The solution is the same one that has been lying on the table for months while the quarrel raged. As a solution, its virtue is simplicity rather than elegance. It would decontrol new gas seven years from now - or perhaps, depending on the inclination of whoever is president in 1985, nine years. The people who want deregulation can say they have at least established the principle. The people who don't want it can reply that many things could happen over nine years. In the interim, that formula will keep prices moving upward at a modest rate, exerting a steady pressure for conservation. The immediate question is whether the House will accept it. Since President Carter has endorsed it, the chances are probably fairly good.

With that, Congress will have to move to a still harder issue: a large and complex sequence of energy taxes. To enact them at the same time that it is dealing with a separate bill to cut income taxes may require greater agility than Congress can summon in an election year. The chances of final enactment of the energy bill, in any form remotely resembling the original Carter proposal, remain no better than poor.

But the president is right to press for the taxes. The point for senators to remember is that oil taxes are going to keep right on rising in any case - and the only question is who collects them. The Carter administration is prepared to rebate part of the increase to American taxpayers. The OPEC governments, on the other hand, are not.

It's useful to draw a rough balance on what's happening elsewhere, while the energy bill continues to make its slow and weary way through Congress. Throughout the country, there has been a widespread response to rising costs of energy and Mr. Carter's warnings of worse to come. Because of a 1975 law, and the manufacturers' discovery that fuel economy now sells cars, new automobiles currently average over 18 miles to a gallon - a third more than four years ago.

Americans are insulating their houses at a rate that has created a shortage of insulation. Industry has begun moving toward more efficient equipment, and the ratio of energy input to production is dropping significantly. The number of oil wells drilled last year was double the number in 1973. Nuclear power produced this winter is triple the level of 1973, before the oil crisis - although that increase represents decisions made a decade ago, before the public opposition to nuclear reactors reached its present level.

But unfortunately, there's another side to the pattern. A lot of companies are postponing plants and investments until Congress and the president can agree on a basic energy law. It's not only the companies in the energy business, planning pipelines and power plants. It's all the companies that use energy, who want to know what the tax and price rules are going to before they commit themselves to new plants and machinery. Economists keep pointing out that the present rate of business investment is lower than it ought to be - exerting a drag on the whole economy and contributing to high unemployment.

It's true that a lot of Americans aren't waiting for a energy bill that Congress can't pass quickly - and may not pass at all. They are making their own arrangements, where they can. But the continual delays, and the deep uncertaintly about the final shape of the bill, are imposing a severe and continuing burden on the country.