WASHINGTON - President Barack Obama and congressional Democrats scored a victory in healthcare talks on Thursday, winning labor union support for a revised tax on high-cost insurance plans and possibly clearing the way for a final agreement.

The deal on the Senate's Cadillac tax removed one of the biggest obstacles in the merger of healthcare bills passed by the Senate and House of Representatives, and negotiators hope to send the bill's major provisions to budget analysts as soon as Friday.

Obama conferred twice on Thursday with key Democratic lawmakers -- once on Capitol Hill in early evening and then later at the White House in a meeting that lasted about four hours before ending at 1:15 a.m./0625 GMT.

At the capitol, Obama acknowledged that opinion polls show the healthcare overhaul is unpopular but promised attitudes would change once the final bill is passed.

I know how big a lift this has been, he said. But he said once it is passed the American people will suddenly learn this bill does things they like and doesn't do things that people have been trying to say it does.

The White House meeting included House Speaker Nancy Pelosi, House Majority Leader Steny Hoyer, Senate Majority Leader Harry Reid and other key Democrats.

The House and Senate versions of the overhaul must be melded into one bill and passed again by each chamber before Obama can sign it.

Both bills would extend insurance coverage to more than 30 million uninsured Americans, create exchanges where individuals can shop for insurance plans and bar insurance practices like refusing coverage to people with pre-existing medical conditions.

But House and Senate negotiators have clashed on how to pay for the changes, with labor unions and House Democrats strongly opposing the Senate's Cadillac tax, which was backed by Obama. Critics said it would hit middle-class families and union members who gave up higher wages for better health benefits.

The deal negotiated with the White House would raise the tax threshold and exempt until 2018 those plans negotiated on behalf of state and local government workers or as part of collective bargaining agreements.

READY TO FIGHT

We're for this healthcare reform and ready to fight for it, said Gerald McEntee, president of the American Federation of State, County and Municipal Employees.

They were difficult negotiations, he told reporters. The president was open-minded in terms of the kinds of things he would agree to.

Democratic Representative Joe Courtney, a leading critic of the Senate tax, said he was not prepared to endorse the bill yet.

The devil is in the details and I will reserve judgment on any compromise until I have had the time to review the proposal, Courtney said.

Labor leaders said the deal would cost about $60 billion of the $150 billion expected to be raised by the Cadillac tax. White House officials did not say where the difference might be made up.

House-Senate negotiators have considered raising the payroll tax on Medicare, the health program for the elderly, and extending it to income from investments by the wealthiest Americans.

They also have asked the pharmaceutical industry to kick in at least another $10 billion more than the $80 billion it agreed to pay last year in a deal with the White House, industry sources said.

The $10 billion would be used to eliminate a doughnut hole in the Medicare drug program that forces patients to pay thousands of dollars out-of-pocket before coverage resumes.

I know $80 billion was too low, House Rules Committee Chairwoman Louise Slaughter said of the drugmakers' contribution.

In a private session with House Democrats after his speech, Obama signaled he supported the House's version of a national insurance exchange, rather than the Senate's state exchanges, a Democratic House aide said.

Democrats are pushing to complete work on the bill before Obama's State of the Union speech in early February, as lawmakers hope to turn to creating jobs ahead of November's congressional elections.

A special election in Massachusetts next week to fill the Democratic seat of the late Senator Edward Kennedy also has added urgency to the talks. A Democratic loss would deny the party its crucial 60th vote, and polls show the race is close.

Neither chamber has much wiggle room in the negotiations. A shift of three votes in the House could doom the bill, which passed by a 220 to 215 vote in November.

The Senate has even less room for error -- the bill passed on Christmas Eve with exactly the 60 votes it needed to overcome unified Republican opposition and a single defection could doom it.

(Additional reporting by Susan Heavey, Jeff Mason, Thomas Ferraro and Andy Sullivan; editing by Eric Beech)