A House Ways and Means subcommittee voted 7 to 0 yesterday to let Social Security recipients earn up to $4,500 in 1978 and $6,000 a year thereafter without loss of benefits. The current earnings limit is $3,000.

The proposed increase would benefit about 1 million people and cost the government $2.5 billion a year.

It was opposed by Social Security Commissioner James B. Caldwell as "too costly at this time," but it was jammed into the Social Security financing bill as a compromise between Republican proposals to lift the earnings lid entirely and Democratic suggestions for a smaller increase.

Sponsors said many retired persons cannot support themselves on their Social Security benefits if they are allowed to earn only $3,000 a year without a benefit cutback. The earnings limit was imposed on the theory that individuals are not truly retired if they still have substantial earnings from employment - and therefore should not receive full retirement benefits.

Subcommittee Chairman James A. Burke (D-Mass), endorsing the proposal to raise the celing to $4.500, said, "They're living on a diet of cat and dog foot," adding that if the proposal got out on the House floor, "you wouldn't get 50 votes against it."

After the plan to go to $4,500 was approved, 7 to 3, Rep. William A. Steiger (R-Wis.) offered a motion to go still higher, to $6,000 starting in 1979, as a second step - and that won, 6 to 2. The whole package was then approved 7 to 0.

The action was precipitated by demands from committee Republicans last week that the earnings ceiling be removed in three steps by 1980, a proposal that would ultimately cost the ailing Social Security trust funds about $7 billion a year.

Rep. Barber B. Conable jr. (R-N.Y.) and other Republicans said the earnings limit removal was the subject of more bills in the House, over 200, than any other Social Security issue.

The earnings ceiling now rise automatically every year with inflation, and it is estimated it will be $3,240 next year without further legislation.

The liberalized earnings ceiling for beneficiaries would cost the Social Security system money because it would mean paying benefits to persons who might have lost them or had them reduced because of the $3,000 limit.

Rep. Abner J. Mikva (D-III), who made the formal proposal to raise the 1978 earnings limit to $4,500, warned that any raise could face difficulties because the congressional budget resolution, which is binding, does not contain any money to liberalize benefits in fiscal 1978.

Burke shot out, "We have to raise the limit in January, 1978, regardless of whether the Budget Committee likes it or not."

If the rise in the ceiling ultimately gets past the Budget Committee problem and clears Congress, it is likely to be the major "sweetener" in a bill devoted largely to finding ways to improve the financial position of the system, whose disability trust fund will run out of money next year and old-age fund a few years later unless some new revenue is rapidly infused.

It is traditional that in every bill with painful new tax provisions and curtailments of some benefits, there must be at least one or two improvements in benefits - "sweeteners" - to help carry the measure through Congress.

While improving the overall earnings ceiling, the subcommittee voted for one $400-million-a-year cost-cutting provision involving earnings of retiress. It wiped out an existing rule under which there is no loss of benefits in any month when a recipients earns under $250.

Some recipients has used this rule to bunch all their earnings into one month and still collect benefits during the other 11. Thus, someone earning over $3,000 in the past could arrange to have it all paid in December, for example, and suffer a benefit loss then while collecting full benefits for the preceding January through November.

In the only other actions yesterday, the subcommittee voted to end the right of state and local government groups to "opt out" of Social Security and set up their own pension plans once they have joined the system, and to make nonprofit organizations subject to Social Security. No effective date was specified on nonprofit organizations. The subcommittee had previously voted to bring in state, local and federal employees also, but without setting a date. It may do so Friday.