The House Ways and Means Committee yesterday approved, 21 to 11, a compromise bill that authorizes $4 billion in grants to the states and payments to hospitals for health insurance and services to jobless workers and their families over the next 2 1/2 years.

The committee rejected several Republican amendments that would have imposed a means test on recipients.

Also, in the first test of a major Reagan administration tax proposal, committee Democrats beat back an amendment by Rep. Willis D. Gradison Jr. (R-Ohio) that would have made employer-paid health insurance premiums taxable as income to workers covered by group health plans through their jobs.

Gradison reminded the committee that the White House has threatened to veto any bill that provides health insurance for the unemployed but does not have some means of financing it.

He said his amendment would tax premiums worth more than $175 a month per family or $70 for an individual and would affect only about 19 percent of workers getting health insurance on the job. He told the Democrats that the overall bill would have a much better chance of becoming law if they accepted this financing provision.

The bill as approved by Ways and Means on virtually a straight party-line vote would provide grants to the states to give jobless workers one year of health benefits under general rules set by the states. Any worker who was receiving unemployment benefits, or had been over the last several years, would be eligible and the state could impose a premium of up to 5 percent of the worker's benefit.

An amendment by W. Henson Moore (R-La.) would require the states to charge workers a co-payment equal to 10 percent of the daily hospital charge, which would come to $25 to $40 a day in most states.

The general structure of the bill was a compromise worked out by Ways and Means Democrats and leaders of the House Commerce Committee, which had reported a substantially broader bill that would have provided an estimated $6 billion for health benefits for jobless workers over the next three years.

The Senate Labor Committee has approved a health benefits bill that would provide $1.8 billion over the next 2 1/2 years.