It would stop $24 billion in across-the-board spending cuts set to take effect over the next two months, although only about half of that total would be offset with savings elsewhere in the budget.
The economic as well as political stakes were considerable.
Economists have warned that without action by Congress, the tax increases and spending cuts that technically took effect with the new year could send the economy into recession.
Even with enactment of the legislation, taxes are on the rise for millions.
A 2 percentage point temporary cut in the Social Security payroll tax, originally enacted two years ago to stimulate the economy, expired with the end of 2012. Neither Obama nor Republicans made a significant effort to extend it.
House Republicans spent much of the day struggling to escape a political corner they found themselves in.
"I personally hate it," Rep. John Campbell of California, said of the measure, giving voice to the concern of many Republicans that it did little or nothing to cut spending.
"The speaker the day after the election said we would give on taxes and we have. But we wanted spending cuts. This bill has spending increases. Are you kidding me? So we get tax increases and spending increases? Come on."
Cantor told reporters at one point, "I do not support the bill. We are looking, though, for the best path forward."
Within hours, Republicans abandoned demands for changes and agreed to a simple yes-or-no vote on the Senate-passed bill.
They feared that otherwise the Senate would refuse to consider any alterations, sending the bill into limbo and saddling Republicans with the blame for a whopping middle class tax increase. One Senate Democratic leadership aide said Majority Leader Harry Reid would "absolutely not take up the bill" if the House changed it. The aide spoke on condition of anonymity, citing a requirement to keep internal deliberations private.