The House Ways and Means Committee yesterday voted to allow, for the first time, an automatic inflation adjustment for homeowners and investors on the taxes they pay on capital gains - the profits from the sale of stocks or other property.

The proposal, which could eventually open the way for automatic inflation adjustments on other federal taxes as well, was approved on a 21-to-16 vote - in part with the support of committee liberals, who hope to load down a conservative substitute for President Carter's tax plan in an effort to defeat it.

The measure, which would affect only those capital gains realized after January 1980, would virtually wipe out the present tax on capital gains and ultimately cost the Treasury billions of dollars in lost tax revenues. The bills would apply to stocks, homes and equipment.

At the same time, the committee refused, on a vote of 24 to 11, to approve a proposal to provide relief to taxpayers for the new Social Security tax increases that went into effect in January.The proposal would have allowed taxpayers a credit on income tax to offset the new taxes.

The surprise approval of the capital gains measure took committee leaders aback. Immediately after the vote, Rep. Al Ullman (D-Ore), the chairman, tried to adjourn the session, but was voted down. Later, liberals banded together to block any reconsideration of the vote.

It was not immediately clear what yesterday's vote would do to prospects for the tax bill. Ullman and panel Republicans had hoped to push through a compromise drafted by Rep. James R. Jones (D-Okla.) that would trim capital gains taxes far less than yesterday's proposal.

However, approval of yesterday's measure makes the bill anathema to liberals, virtually ensuring their opposition. And unless the committee can agree later on a complete substitute for the bill it now is drafting, the measure approved yesterday cannot be reconsidered.

Rep. Barber B. Conable (R-N.Y.), the ranking Republican on the Ways and Means Committee, warned yesterday that the action might derail the Jones compromise, which earlier had been though certain to pass. "I don't want us to be in the position," he said, of proposed by Rep. Bill Archer (R-Tex), would allow howeowners and inves-

Thus, if a stock-seller reaps $1,000 in profits when he sells his stock in 1981, and inflation between 1979 and 1981, and inflation between 1979 and 1981 has been 15 per cent, he could count his profit as $850. Only half that $850 would be subject to income tax at all, and that would be taxed at his regular rate.

Archer told the committee he thought it was unfair to tax the ful proit reaped from such a sale, as the law provies now, because "what you're actually doing is taxing inflation." Many conservatives have advocated automatic inflation adjustments for that reason.

The Archer provision was opposed strongly by the Carter administration. Treasury officials say the bulk of the tax benefits from special treatment of capital gains go to persons in the $100,000-a-year and up tax brackets. Most home sellers excape capital gains taxes by buying homes more costly than the ones they sold.

The proposal to provide relief for the recent Social Security tax increases would have allowed both workers and employers a tax credit on their federal income taxes of 5 per cent of the payroll taxes they pay for 1979 and 1980 - a maximum of $70 next year for a top-bracket worker.

The provision, which was introduced by Rep. Richard A. Gephardt (D-Mo.) would have cost the Treasury $6 billion, in addition to the $15.2 billion contemplated for the rest of the big tax-cut bill. The credit for employers would have been reduced by the deductions they take for paying Social Security taxes.

The vote on the Gephard: proposal marked the first time the committee has considered the question of Social Security tax relief since defeating a broader measure last spring. Gephardt said yesterday he would seek to offer the proposal when the bill reaches the House floor.

Gephardt had hoped to push through the cutback as "an interim measure" until the committee begins work on a new overhaul of th Social Security system at the start of next session. The measure was backed by liberals, but was opposed by Republicans and conservative Democrats.

Besides the Social Security measure, the panel also rejected three other news proposals.

A bid by liberal Rep. William M. Brodhead (D-Mich) to impose a modest limitation on tax deductions for the so-called "three-martini luch" by restricting business writeoffs for entertainment to $44 a person per day - or $440, if 10 persons wete involved. The vote was 23 to 14.

A move by conservative Rep. Richard T. Schulze (R-Pa.) to raise the amount of business earning taxed below the standard 48 percent corporate tax rate. Under present law, earnings below $50,000 are taxed at rates of 20 to 22 percent. Schulze would have changed that to 17 percent for the first $75,000.

An attempt by Rep. James Corman (D-Calf.) to allow welfare recipients to exclude aid-for-dependent-children payments when calculating their earnings to qualify for the "earned income credit" - a tax break for poor families in which at least one parent works. The vote was 19to 13.