The Senate Finance Committee yesterday gave tentaive approval to a measure that would curb Medicaid and Medicare payments to hospitals in what could be the last chance for health cost containment action by this Congress.

Although the measure now applies only to the two federal health insurance programs for the aged and poor, attempts to expand it are expected on the Senate floor. Sen. Gaylord Nelson (D-Wis) said he intends to offer amendments to include private insurers if the measure reaches the floor.

"I'm sure there will be many amendments and it will be controversial, as we've seen in the House," said Sen. Herman E. Talmadge (D-Ga.), the bill's chief sponsor. "They've marched it uphill and downhill and done nothing."

Last Tuesday the House Commerce Committee rejected an administration-backed bill that would have imposed mandatory federal controls on hospital costs if, over two years, a voluntary effort by hospitals failed. The committee instead voted to endorse the voluntary program and create a board to oversee it.

The action virtually ended hopes for House passage of a strong cost control bill, a top priority of the administration, this year.

The Finance Committee's action, on a measure Talmadge introduced in 1976, would penalize hospitals whose routine operating costs exceed the average costs of comparable facilities, average costs of comparable facilities, by reducing their Medicaid and Medicare reimbursements.

Hospitals whose routine costs fall below the average would be rewarded with incentive payments of up to 5 percent of the payment rate.

To encourage doctors to accept assignments for treatment of Medicare patients, the bill provides paperwork shortcuts and a $1 incentive per patient visit, for those who provide all services to anyone covered by the program. Doctors now bill Medicare on a claim-by-claim basis.

Talmadge also amended the proposal yesterday to allow physicians to perform in their offices many minor surgical procedures that now require hospitalization to qualify for federal reimbursement.

A spokesman for the American Medical Association, which has opposed Talmadge's bill, said that provision, if adopted, should please many doctors. Medicaid now covers physician fees for ambulatory surgery, but will not pay for the facilities, other than in a hospital, he said.

Hospitals also would be encouraged, under the measure, to shut down or convert to other uses their underused bed capacity, by a provision that allows them to include additional costs for such measures in their payment level calculation. An estimated 100,000 hospital beds are counted as surplus.

If the Talmadge bill is amended, as Nelson suggested, to cover other health insurers, it "might be the best kind of hospital cost containment legislation," a Department of Health, Education and Welfare spokesman said after yesterday's session.

Hale Champion, undersecretary of health, education and welfare, expressed delight at passage of the bill. "It's got the money we need to keep the momentum for the HMO program going," said Champion, who helped set up an HMO at Harvard University several years ago.

The Senate-passed measure originally had called for additional federal funding amounting to $400 million over a six-year period. But several senators, led by Sen. Sam Nunn (D-Ga.), argued that smaller subsidies are needed.

The $170 million that was approved would permit federal aid to continue at existing levels. It includes $35 million for fiscal 1979, beginning Oct. 1, and $65 million and $70 million in the two following years.