Congressional officials said they expected Obama to sign the bill as early as Tuesday.
A second measure -- making changes in the first -- was lined up for passage later in the evening. It would then go to the Senate, where Democratic leaders said they had the votes to pass it.
Crowds of protesters outside the Capitol shouted "just vote no" in a futile attempt to stop the inevitable taking place inside a House packed with lawmakers and ringed with spectators in the galleries above.
Across hours of debate, House Democrats predicted the major bill, costing $940 billion over a decade, would rank with other great social legislation of recent decades.
"We will be joining those who established Social Security, Medicare and now, tonight, health care for all Americans, said Speaker Nancy Pelosi, partner to Obama and Senate Majority Leader Harry Reid, D-Nev., in the grueling campaign to pass the legislation.
"This is the civil rights act of the 21st century," added Rep. Jim Clyburn of South Carolina, the top-ranking black member of the House.
Republicans readily agreed the bill would affect everyone in America, but warned repeatedly of the burden imposed by more than $900 billion in tax increases and Medicare cuts combined.
"We have failed to listen to America," said Rep. John Boehner of Ohio, leader of a party that has vowed to carry the fight into the fall's midterm elections for control of Congress.
The nonpartisan Congressional Budget Office said the legislation would extend coverage to 32 million Americans who lack it, ban insurers from denying coverage on the basis of pre-existing medical conditions and cut deficits by an estimated $138 billion over a decade. If realized, the expansion of coverage would include 95 percent of all eligible individuals under age 65.
Far beyond the political ramifications -- a concern the president repeatedly insisted he paid no mind -- were the sweeping changes the bill held in store for millions of individuals, the insurance companies that would come under tougher control and the health care providers, many of whom would face higher taxes.
For the first time, most Americans would be required to purchase insurance, and face penalties if they refused. Much of the money in the bill would be devoted to subsidies to help families at incomes of up to $88,000 a year pay their premiums.
The measure would also usher in a significant expansion of Medicaid, the federal-state health care program for the poor. Coverage would be required for incomes up to 133 percent of the federal poverty level, $29,327 a year for a family of four. Childless adults would be covered for the first time, starting in 2014.
The insurance industry, which spent millions on advertising trying to block the bill, would come under new federal regulation. They would be forbidden from placing lifetime dollar limits on policies, from denying coverage to children because of pre-existing conditions and from canceling policies when a policyholder becomes ill.
Parents would be able to keep children up to age 26 on their family insurance plans, three years longer than is now the case.
A new high-risk pool would offer coverage to uninsured people with medical problems until 2014, when the coverage expansion would go into high gear.
The final obstacle to passage was cleared a few hours before the vote, when Obama and Democratic leaders reached a compromise with anti-abortion lawmakers whose rebellion had left the outcome in doubt. The president issued an executive order pledging that no federal funds would be used for elective abortion, satisfying Rep. Bart Stupak of Michigan and a handful of like-minded lawmakers.
A spokesman for the U.S. Conference of Catholic Bishops expressed skepticism that the presidential order would satisfy the church's objections.
For the president, the events capped an 18-day stretch in which he traveled to four states and lobbied more than 60 wavering lawmakers in person or by phone to secure passage of his signature domestic issue. According to some who met with him, he warned that the bill's demise could cripple his still-young presidency.
After more than a year of political combat, Democrats piled superlative upon superlative across several hours of House debate.
Rep. Louise Slaughter of New York read a message President Franklin Roosevelt sent Congress in 1939 urging lawmakers to address the needs of those without health care, and said Democrat Harry Truman and Republican Richard Nixon had also sought to broaden insurance coverage.
Republicans attacked the bill without let-up, warning it would harm the economy while mandating a government takeover of the health care system.
"The American people know you can't reduce health care costs by spending $1 trillion or raising taxes by more than one-half trillion dollars. The American people know that you cannot cut Medicare by over one-half trillion dollars without hurting seniors," said Rep. Dave Camp, R-Mich.
"And, the American people know that you can't create an entirely new government entitlement program without exploding spending and the deficit."
Obama has said often that presidents of both parties have tried without success to achieve national health insurance, beginning with Theodore Roosevelt early in the 20th century.
The 44th president's quest to succeed where others have failed seemed at a dead end two months ago, when Republicans won a special election for a Massachusetts Senate seat, and with it, the votes to prevent a final vote.
But the White House, Pelosi and Reid soon came up with a rescue plan that required the House to approve the Senate-passed measure despite opposition to many of its provisions, then have both houses pass a fix-it measure incorporating numerous changes.
To pay for the changes, the legislation includes more than $400 billion in higher taxes over a decade, roughly half of it from a new Medicare payroll tax on individuals with incomes over $200,000 and couples over $250,000. A new excise tax on high-cost insurance policies was significantly scaled back in deference to complaints from organized labor.
In addition, the bills cut more than $500 billion from planned payments to hospitals, nursing homes, hospices and other providers that treat Medicare patients. An estimated $200 billion would reduce planned subsidies to insurance companies that offer a private alternative to traditional Medicare.
The insurance industry warned that seniors would face sharply higher premiums as a result, and the Congressional Budget Office said many would return to traditional Medicare as a result.
The subsidies are higher than those for seniors on traditional Medicare, a difference that critics complain is wasteful, but insurance industry officials argue goes into expanded benefits.