The nonpartisan Congressional Budget Office estimates that 24 million fewer people will have health insurance in 2026 under GOP bill.

Time for talk running out, President Donald Trump on Tuesday warned wavering House Republicans that their jobs were on the line in next year’s elections if they failed to back a GOP bill that would upend Barack Obama’s Affordable Care Act.

The countdown quickened toward an expected vote Thursday on legislation undoing much of the law that has provided coverage to some 20 million Americans. Mr. Trump huddled behind closed doors with rank-and-file Republicans just hours after GOP leaders unveiled changes intended to pick up votes by doling out concessions to centrists and hardliners alike.

“If we fail to get it done, fail to (meet) the promises made by all of us, including the president, then it could have a very detrimental effect to Republicans in ‘18 who are running for re-election,” said Rep. Mike Conaway, R-Texas. “If it fails, then there will be a lot of people looking for work in 2018.”

Mr. Trump’s message to Republicans- “If you don’t pass the bill there could be political costs,” said Rep. Walter Jones, R-N.C.

Even with the revisions, the outlook for House passage remains dicey. After a day of cajoling votes, a senior administration official said the White House is trying to persuade about 20 to 25 House Republicans who are either opposed or undecided. House leaders and Trump can only afford to lose 21. The official spoke on condition of anonymity to discuss internal deliberations.

At a Republican Congressional Committee fundraiser Tuesday night, Trump said the American people had handed Republicans the House, Senate and White House with an expectation they would deliver.

“These are the conservative solutions we campaign on and these are the conservative solutions the American people asked us as, a group, to deliver,” he said, calling Thursday’s vote “crucial” for the party and the American people.

“I think we’re going to have some great surprises,” he added. “I hope that it’s going to all work out.”

The GOP bill would scale back the role of government in the private health insurance market, and limit future federal financing for Medicaid. It would repeal tax increases on the wealthy that Democrats used to pay for Obama’s coverage expansion. Fines enforcing the Obama-era requirement that virtually all Americans have coverage would be eliminated.

The nonpartisan Congressional Budget Office estimates that 24 million fewer people will have health insurance in 2026 under the GOP bill.

Mr. Trump warned House Republicans they’d seal their political doom if they waver, with the party potentially losing control of the House. Still, several conservatives were steadfast in their opposition even after the session with Trump.

“The president wouldn’t have been here this morning if they have the votes,” said Rep. Rod Blum, R-Iowa, a member of the Freedom Caucus who complained that the GOP bill leaves too much government regulation in place.

Rep. Chris Collins, R-N.Y., said Mr. Trump told Republicans he would campaign for them if they backed the bill. Mr. Trump didn’t indicate what he would do to those who vote against the bill, but during the caucus, he singled out Rep. Mark Meadows, R-N.C., an outspoken critic.

Collins said Mr. Trump asked Meadows to stand up, called him a great guy and said he is counting on Meadows to get this over the line.

“The president is very adroit at putting somebody on the spot and he did that today with Mark Meadows,” Collins said. Asked if there was a threat to Meadows in that, Collins responded, “There was no threat whatsoever.”

Another person at the event said Trump told Meadows, “I’m gonna come after you so hard.” Mr. Trump delivered that line with a smile, but it was also lined with a touch of seriousness, said the person, who spoke on condition of anonymity to discuss a private meeting.

As for Meadows, he was still a “no” vote at the end of the day.

Speaker Paul Ryan, R-Wis., told reporters that if Republicans pass the legislation, “people will reward us. If we don’t keep our promise, it will be very hard to manage this.”

If the bill advances, prospects are uncertain in the Senate, where Republicans hold a slim majority. Six GOP senators have expressed deep misgivings including Tom Cotton of Arkansas, who said Tuesday he cannot support the House bill.

In an Associated Press interview, Senate Majority Leader Mitch McConnell, R-Ky., signaled he’d use Trump’s clout to pressure unhappy Republicans in his chamber.

“I would hate to be a Republican whose vote prevented us from keeping the commitment we’ve made to the American people for almost 10 years now,” McConnell said.

The House GOP bill would end Obama-era subsidies based on peoples’ incomes and the cost of insurance. A Medicaid expansion to 11 million more low-income people would disappear.

Instead, the bill would provide tax credits based chiefly on age to help people pay premiums. But insurers could charge older consumers five times the premiums they charge younger people instead of Mr. Obama’s 3-1 limit.

The revisions by House GOP leaders to round up votes come at a cost literally. Congressional budget experts had projected that the original bill would cut federal deficits by $337 billion over a decade. But that amount is dwindling as top Republicans dole out provisions helping older and disabled people.

Democrats remain solidly opposed to the GOP repeal effort.