The vote of 217-213 could hardly have been closer in the Republican-controlled chamber, highlighting the concerns of many in Trump's party who fear the bill could bump millions of Americans off their coverage and send costs skyrocketing for others.
Twenty Republicans joined the opposition, along with all Democrats, in the most contentious congressional vote of Trump's young presidency.
But Trump, desperate to erase a crushing defeat in March when an earlier version of the health care bill failed, personally won over several reluctant Republicans, and the bill slipped across the finish line.
Obamacare is "essentially dead," the president triumphantly declared in the White House Rose Garden, surrounded by key Republican lawmakers.
"We're going to finish it off and we're going to go on to a lot of other things."
As for the bill which is now halfway through Congress, Trump expressed optimism.
"We're going to get this passed through the Senate. I feel so confident."
It is a conservative dream years in the making: ditching Barack Obama's Affordable Care Act, which Republicans accuse of sending health premiums soaring while reducing options for millions.
Democrats counter that Obamacare helped 20 million Americans gain health coverage and saved thousands of lives by barring insurers from denying policies to people with pre-existing conditions.
But Republicans including Trump have campaigned relentlessly on the pledge to dismantle the 2010 reforms.
"This bill delivers on the promises that we have made to the American people," House Speaker Paul Ryan told clapping and cheering Republicans -- while Democrats shouted their disapproval.
"A lot of us have been waiting seven years to cast this vote," he added. "End this failed experiment."
'Walk the plank'
An earlier version of the Republican plan collapsed when party moderates and conservatives failed to get on board -- dealing Trump one of the most stinging setbacks since he took office.
In extraordinary scenes in the House chamber, lawmakers hurled jeers across the center aisle, taunting one another about the controversial legislation.
"Where's the score!" Democrats hollered, referring to the lack of a budget office estimate of the legislation's cost for the federal government.
"If you voted for this bill, you walk the plank, from moderate to radical," she said. "You will glow in the dark" from the toxic effect of the vote.
The bill faces an uphill battle in the Senate, despite Trump's confidence.
Republican Senator Lindsey Graham expressed concerns.
"A bill -- finalized yesterday, has not been scored, amendments not allowed, and 3 hours final debate -- should be viewed with caution," he tweeted.
Senate Democrat Richard Blumenthal was less delicate, suggesting the bill was dead on arrival.
House Republicans have "done nothing to cure its underlying problems," he said.
"Instead they've created a Frankenstein legislative proposal that will wreak havoc on our health care system."
Republican leaders won over enough skeptical members with an amendment that adds $8 billion over five years to help cover insurance costs for people with pre-existing conditions.
Several medical experts and health groups ridiculed the amendment, saying it falls woefully short of the hundreds of billions of dollars likely needed to control health costs for the sick under the new bill.
The American Medical Association issued a scathing rebuke of the latest Republican effort, warning it would lead millions of Americans to lose their health care.
Ryan and other Republicans insisted that the plan covers people with pre-existing conditions.
An earlier budget office estimate predicted that the Republican bill would leave 24 million fewer people insured by 2026 than under the current law.
No new estimate was published prior to Thursday's vote, although one is expected before the Senate considers the bill.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.