When President Carter threatened to veto the "middle-income" tax bill that emerged from the House last month, observers here clucked knowingly that the Georgian was boxing himself into another political corner. There was little real hope that the Senate would bail him out.

It was considered unlikely that the Senate Finance Committee which is not usually regarded as a bastion of populism when it comes to tax matters, would go very far to meet Carter's objections to the House bill. The president would end up having to veto the measure. And chaos would result.

Now in what may rank as one of the year's biggest ironies, Sen. Russell B. Long (D-La.), the Finance Committee chairman, is moving to provide Carter with an out by "correcting" the two big flaws in the House bill that the White House has protested most.

In the Panel's first few days of formal mark-up, the Louisianan has pushed through provisions - conspicuously absent from the House bill - that would provide an extra $1.8 billion in tax breaks for low-income workers, and has proposed effectively reversing the House's dilution of the minimum tax.

He also has hinted he may try to scrap two other House-Passed provisions that Carter abhors: a new inflation adjustment for capital gains taxes and a big new tax break for home sellers. And he's made a big show of warning committee members to hold back their proposals for special-interest amendments.

As might be expected, however, Long's rescue efforts are not without their price. Along with the "improvements," the Louisianan is preparing to quadruple the measure's already-generous capital gains cuts - which go largely to high-income investors - and to delete some existing laws that hit at the rich.

Indeed, from early indications, it seems that by the time the Finance panel gets through, Carter may end up with little more than a face-saving gesture: There will be enough changes to enable the president to back away from his veto threat, but it still won't be the kind of tax bill Jimmy Carter could love.

The strategy Long plans to use to accomplish this feat involves simple padding and some sleight of hand. The Louisianan doesn't plan to alter the basic thrust of the House bill. He simply intends to enlarge it to accommodate more cuts for the rich and the poor - and to delay other charges somewhat.

Moreover, although it still is too early to tell, Long had indicated in interviews he doesn't plan to give Carter much more than the House bill did in "loophole" closing tax "reforms." The "reform" proposals were considered a mainstay of the president's original package.

What has put smiles on the face of some committee-watchers, however, is that Long seems to be playing his new role as president-rescuer to the hilt - going out of his way in committee sessions to give the appearance of trying to accomodate the White House:

In what most observers would agree was an unprecedented move, Long began the mark-up by pleading with loophole-minded senators to hold back on their pet tax break proposals - even obtaining tacit support from ranking GOP member Carl Curtis (R-Neb.), not always a conservative on that issue.

When Republicans began pushing the costly Roth-Kemp tax-cut proposal last week, Long observed archly the Senate could pass a tax measure that Carter would veto, but it wouldn't accomplish much beyond delaying the session during a political campaign year. The committee has scheduled a vote on the Roth-Kemp proposal tomorrow).

Finally, in a stunning reversal, the Finance Committee chairman went out of his way to win a truce with Sen. Edmund S. Muskie (D-Me.) over the budgetary limit on the overall size of the tax cut. (Muskie allowed Long a larger total tax cut. Long supported this year's budget resolution).

The change in atmosphere has been so heady that the administration, bitten hard in the House, has been cautiously considering Long's offer of friendship. Last week, Secretary of the Treasury W. Michael Blumenthal endorsed the Finance actions as constructive. It remains to be seen whether Carter agrees.

There's substantial debate over how much Long's plan actually would do to bring the House-passed bill close to what Carter wants. The president has complained most about two facets of the House proposal: It skews most of the relief to the $20,000-to-$50,000 groups. And it dilutes the minimum tax.

(The dilution of the minimum tax is especially significant because enactment of that measure in 1969 provided the first assault against the abuse of tax shelters by high-income persons seek to avoid payment of taxes. Since the provision was strengthened in 1976, the abuses have declined).

What Long plans to do essentially is leave the thrust of the House bill intact, but add tax breaks for those at the lower end of the scale - and the top. The money would come by increasing the overall size of the tax bill by $2 billion or so, and reshuffling the effective dates of some previous.

Long would undo theHouse action on the minimum tax by imposing a new alternative tax and with rates of 10 to 25 percent (compared to 15 percent under present law). The shift would ease taxes for some high-income persons, but toughen the tax treatment of those with a lot of tax shelters.

In return, however, Long wants to quadruple the tax breaks for investors provided in the House bill by retaining the present 49.1 percent maximum rate but allowing those who sell stocks or other property to keep 70 percent of their profits tax free, rather than the present 50 percent.

That alone would increase the benefits for capital gains recipients to $4 billion, rather than the $1 billion provided in the House bill, with about a third of the revenues going tothose in the $200,000-and-up category. (With the tighter maximum tax proposal, the net windfall would be about $3 billion).

At the same time, Long has hinted he may help Carter further by scrapping costly provisions in the House bill that would index capital gains taxes for inflation and provide a $100,000-a-person windfall for home sellers - further bolstering Carter's ability to claim the Senate action as a victory.

It still is too early to tell whether Long will succeed in his venture, or whether Carter will accept the expensive olive branch he's being offered. Even if the bill goes through the committee as Long wants, there's still the prospect of new amendments on the floor.

Ironically, if Long is successful in keeping special-interest amendments off the Finance Committee bill, he could dent his own power on the floor. A standard Long tactic in earlier years had been to load the bill in committee - in return for pledges of support - and then scrap most amendments on the floor.)

Moreover, there's no firm guarantee Carter himself will agree that the Finance Committee bill is enough of an improvement. Although initial inications are that the prospect of a veto is waning somewhat, key White House aides reportedly are pushing hard for Carter to carry out his threat.