President Carter wiped out a year of history yesterday, saying that of course he could accept gradual deregulation of new natureal gas, he had campaigned for it.

During the 1976 president campaign, Carter did write a letter to governors of the gas-producing states of Texas and Oklahoma stating that "I will work with the Congress . . . to deregulate new natural gas."

But last April Carter asked Congress, as part of his comprehensive energy package, to continue price controls at a higher level, and denounced instant deregulation as a ripoff of consumers.

His news conference statement yesterday, which signaled his support of a last-ditch Senate proposal to salvage a gas bill from a 3 1/2-month House-Senate conference deadlock, caused as much consternation among consumer groups as his switch to regulation last year caused distress to the gas industry.

A long list of consumer groups, headed by James Flug of Energy Action, fired off a telegram to Carter, recalling that last October he had promised not to change his position in regulation without consulting them first. They expressed "deep distress" at his statement.

Rep. John D. Dingell (D-Mich.), leading House specialist on natural gas and a staunch supporter of regulation during 23 years in the House, said the president has taken three positions on gas pricing - deregulation, regulation and now phased deregulation. "I don't know what to believe," he said.

Asked yesterday if he would accept deregulation of new gas over a period of years, Carter replied:

"Yes. This was a campaign statement and commitment of mine, that I thought natural gas should be deregulation. In my speech to Congress last April 20 (his energy message), I repeated this hope, and I think that a long-phased-in deregulation process without shocks to our national economy would be acceptable."

Carter's proposal to Congress last April was that it raise the price ceiling to newly discovered natural gas from the then price of $1.45 per thousand cubic feet to $1.75, extend regulation into the interstate market and continue price controls indefinitely. There was talk that he might veto a deregulation bill.

When Dingell's subcommittee narrowly voted for deregulation last year, the White House issued a statement by Carter angrily denouncing the oil-gas interests for working againist the public interest. The House approved Carter's regulation plan, but the Senate voted to deregulate new gas after two years.

The bill was sent to a House-Senate conference to resolve differences, but there have been no real negotiations because Senate conferees were split down the middle and unable to agree on a position.

Finally, after weeks of meetings, a bare majority of the Senate conferees agreed this week to what they indicated was their last effort to reach a gas agreement. This would deregulate new gas over seven years, with either the president or Congress empowered to reimpose controls for one two-year period if prices go too high.