“This is a nasty, two-step strategy that has long been the holy grail for hard-right Republicans,” said Senator Chuck Schumer, Democrat of New York and the minority leader. “If this bill passes, you can bet the Republicans will immediately sharpen the knives for middle-class benefits.”

The Congressional Budget Office said on Tuesday that a law passed in 2010 would necessitate cuts to Medicare of as much as $25 billion next year. The pay-as-you-go law requires that legislation that adds to the federal deficit be paid for with spending cuts or other offsets. If that does not happen, automatic cuts to programs like Medicare kick in. The Medicare cuts, which are capped at 4 percent of the program’s annual spending, could reach almost a half trillion dollars over 10 years, according to the nonpartisan Committee for a Responsible Federal Budget.

The cuts can be averted through bipartisan legislation, though it is unclear whether Republicans would go along with such workarounds.

Senator Ron Wyden of Oregon, the top Democrat on the Finance Committee, said previous Republican tax cut efforts had paved the way for sweeping spending cut proposals after the red ink reared its head. After President George W. Bush signed tax cuts in 2001 and 2003, his administration sought to overhaul Social Security and Medicare in hopes of cutting costs.

“I can’t believe how quickly the deficit hawks in the Republican Party flew away after they saw the $1.5 trillion,” Mr. Wyden said of the lost revenues that Republicans have approved in their tax plan. “We’re sure that they will start making their way back when we see the deficits.”

Fiscal conservatives in the House and the Senate have long wanted to rein in spending on such programs but have had to temper those desires this year now that President Trump, who promised as a candidate not to touch entitlement programs, is in office.