President Carter won his big victory on energy yesterday as the House Ways and Means Committee, which shot down parts of his plan last week, approved a key section to increase oil prices without giving a windfall to producers.

The committee approved a wellhead tax on crude oil whose effect would be to raise the price of gasoline about 7 cents a gallon by 1981.

"This was the real heart of the President's energy program," Chairman Al Ullman (D-Ore.) declared after the vote. "What we have done today is ensure to the country that we will have a meaningful energy program."

At the White House, Carter's press secretary, Jody Powell, said the President was "extremely pleased by what he termed the 'courageous action' taken by the House Ways and Means Committee, action taken in the face of an intense lobbying campaign by the oil industry."

After tentative losses last week on his proposed stand-by gasoline tax, price controls on natural gas and tax on low gas-mileage cars, the President came out fighting for the oil tax fee of a payment back to oil producers called a plowback.

He sent to the committee session Laurence Woodworth, assistant treasury secretary for tax policy and former chief tax advisor to the committee, to say that Carter considered any plowback "a ripoff on the American people." Woodworth repeated this description and others similarly harsh several times despite Republican complaints about his "inflammatory rhetoric." When the votes were cast the oil industry lost, 21 to 16, much worse than expected.

The plowback was rejected and the tax then approved by identical votes, with the committee's 12 Republicans and four oil-state Democrats on the losing side.

The President's proposal is to tax up the price of oil to reduce consumption. In three annual steps the tax paid on crude oil at the refinery would wipe out the present two-tiered price structure for so-called new and old oil and move the price of all domestic oilll to the world market figure of last April of about $13.50 per 42-gallons barrel. The administration believes this higher price will save a day, by deterring consumption, and calls it the heart of its conservation programme.

Since the purpose of tax is to conserve energy rather than rise revenge, Carter proposed that the funds be returned to taxpayers, heating oil customers and the old or poor who pay no taxes. The committee will vote on the rebate proposal today.

Rep. Joe Waggonner Jr. (D-La), leading the fight for the oil industry, proposed yesterday that 20 per cent of the tax be given to producers to help explore for new oil. They would be eligible for this plowback only if they were spending at least 40 per cent of their gross income on exploration. The plowback would match dollar for do llar their investment above that figure.

This would have amounted to giving producers $2.8 billion a year. The tax when fully effective in 1981 is expected to produce about $14.3 billion in revenue.

Woodworth protested that this would amount to a gift to producers because they will not paythe oil equalization tax. It is to be paid by the "first purchaser" and eventually would be passed on to consumer

"This is particularly bad", said Woodworth. It "amount to a liability on the first purchaser. . .which in practice is borne by the consumer. . .and yet you would take 20 per cent of what is paid by the consumer and say here is a free gift back to the producer. I can't think of anything that would be much worse."

Supporters of the plowback contended that it is needed to encourage exploration for new oil reservoirs. Opponents argued that the $13.50 price, four times higher than four years ago, should be incentive enough to look for oil.

After losing, 21 to 16, Waggonner tried a $500 million-a-year plowback limited to independent producers and lost again, 17 to 11. A final attempt, limiting the plowback to a tax credit that could not exceed a producer's income tax at an estimated revenue loss of about $300 million, was rejected, 19 to 11.

The committee in other action did redefine a category of oil that would be free of the tax, with the producer getting the full world price. To encourage exploration, the administration proposed creating this category and defined it as oil pumped from a well drilled after April 20, 1977 - when the President delivered his energy message to Congress - and which is at least 2 1/2 miles from or 1,000 feet below an existing well. This was to prevent producers from tapping old wells to get more profitable oil.

The committee had testimony that it was possible to find a new reservoir within a few hundred yards of an existing well or to tap into an existing well at more than 1,000 feet below it. By 22 to 15 the committee struck the 2 1/2 miles and 1,000 feet to make it easier to find new oil.