(Reuters) - Congress, after months of bitter fighting, is poised to pass Friday a payroll tax cut extension that President Barack Obama argues is vital to the health of the economy.

The legislation would continue for two months a 4.2 percent payroll tax rate that otherwise would expire on New Year's Eve and ratchet up to 6.2 percent for 160 million American workers.

I congratulate members of Congress for ending the partisan stalemate, said Obama.

House Speaker John Boehner, R-Ohio, yielded to pressure from Democrats and some in own his party and agreed, with minor changes, to allow a vote on a bill passed by the Senate last week with bipartisan support.

Boehner acknowledged the opposition that he faced in initially opposing the measure.

It may not have been politically the smartest thing in the world, Boehner told reporters late on Thursday. But he said his fellow House Republicans waged a good fight.

Obama said: Because of this agreement, every working American will keep his or her tax cut - about $1,000 for the average family over the course of a year.

The two-month deal between Democrats and Republicans in the Senate and House comes after they were unable to agree on ways to offset the costs of a full-year extension.

If both chambers approve the two-month extension on Friday, a new round of negotiations would begin in January to add 10 more months to the measure.

Some last-minute roadblocks could still occur. If any member of Congress objects to a fast vote on Friday, passage of the two-month extension would be delayed, probably until next week.

It was unclear whether any restive conservative Republicans in the House might object to a voice vote, forcing Boehner to schedule a roll-call vote in coming days.

But either way, the legislation is expected to eventually be approved by Congress and sent to Obama to sign into law before the Dec. 31 deadline.

Last Saturday, the Senate approved the two-month extension in a strong, bipartisan vote. But House conservatives, challenging Boehner, said they would not go along. Instead, they pushed for a year-long extension, despite earlier opposition to any renewal of the payroll tax cut.

Their maneuvers led some Democrats to suspect that Republicans were simply trying to kill the measure.

House Republicans all week insisted on a 12-month payroll tax extension. But Democrats did not budge, arguing that the two-month compromise hammered out in the Senate must first be approved to ensure no lapse in the lower rate. Then, they said, negotiations could continue.

But with opposition to the House Republicans mounting every day - from Senate Republicans lawmakers to conservative commentators and outside political advisors, Boehner saw no alternative but to relent.

Besides extending the payroll tax cut for two months, the legislation also temporarily continues some unemployment benefits that were set to expire in coming weeks and avoids a cut in payments to doctors who treat elderly patients in the government-backed Medicare health insurance program.

In one victory for Republicans, the legislation has a provision aimed at forcing a quick decision by Obama on the Keystone XL pipeline project that would run from Canada to the Texas coast.

(Editing by Paul Simao)