Nearly 40 House Democrats defied President Obama and helped the Republican majority pass a bill Friday that lets Americans keep, for one year, health plans that do not comply with Obamacare.

The defections from 39 members of Mr. Obama’s party highlighted the pressure on Congress to help people who lost coverage because of the president’s signature law, as balky websites keep a veil over alternative plans and pressure mounts on the Democrat-led Senate to forge a remedy.

“Let’s face it, millions of people right now have a cancelled policy,” Rep. Ron Barber, Arizona Democrat, said before voting for the Keep Your Health Plan Act.

The House passed the bill, 261 to 157, despite a veto threat from Mr. Obama and objections from Democrats who said the legislation was an insidious attempt to rot the Affordable Care Act from the inside out.

Four Republicans voted against the bill, perhaps because it could be viewed as an attempt to smooth over Mr. Obama’s controversial reforms.

Rep. Fred Upton, Michigan Republican, offered the bill at the height of furor over Mr. Obama’s oft-repeated promise that people who liked their health plans could keep them. Millions of Americans received cancellation notices because their plans did not meet the health care law’s coverage requirements, forcing the president to apologize as vulnerable Democrats scrambled to find a legislative solution.

Rampant glitches on the website — a federal portal that connects 36 states with plans under Obamcare — have intensified the problem, because people losing their policies cannot explore their options.

Mr. Barber said some Arizonans are “beside themselves.”

“Because by December 31 they don’t have health coverage, and they can’t get on the exchange to find out what’s available,” he told reporters.

Mr. Obama announced an administrative remedy on Thursday that permits insurers to offer a one-year renewal to people who hold noncompliant plans, and Senate Democrats are pushing legislation that would let existing enrollees hold onto their plans indefinitely.

The Republican-led bill goes further, allowing new enrollees to gain current health plans that do not comply with Obamacare.

Democratic opponents of the bill said the GOP offered a hocus-pocus fix that amounts to yet another attempt to repeal Mr. Obama’s signature law.

“It basically allows them to sell low-quality 2013 plans all through 2014, nothing else,” Rep. Frank Pallone, New Jersey Democrat, said.

Rep. Jim McGovern, Massachusetts Democrat, deemed it a “colossal waste of time.”

The White House said Mr. Obama would veto the House bill because it would likely increase the number of people with barebones plans, undermining Obamacare’s attempts to offer better protections through state-based insurance markets.

If too many young and healthy people keep noncompliant plans, a high proportion of sicker consumers on the exchanges — people with preexisting conditions can no longer be denied — would cause premiums to rise and spoil Mr. Obama’s overhaul.

“The Administration supports policies that allow people to keep the health plans that they have,” the White House said in a statement of administration policy. “But, policies that reverse the progress made to extend quality, affordable coverage to millions of uninsured, hardworking, middle class families are not the solution.”

The House voted shortly before Mr. Obama met with insurance company executives at the White House.

The president made no mention of his renewal proposal in remarks before the meeting. Instead, he said they would be “brainstorming” ways to make Americans aware of their coverage options.

“Because of choice and competition, a whole lot of Americans who’ve always seen health insurance out of reach are going to be in a position to purchase it,” he said.

But Mr. Obama’s administrative decision has some state insurance commissioners worried. The logistics of grabbing back people who received cancellation notices are murky, they said, and it may prevent customers from contributing to a robust exchange in their respective states.

Rep. John Fleming, Louisiana Republican, said Mr. Obama’s fix “really only offers political cover for Democrats. It doesn’t really do anything substantial.”

He said the Upton bill is a step in the right direction, but he is working on legislation that lets Americans “meet the individual mandate as long as you purchase insurance that you like that you’re comfortable with.”

“What I’d like to do is actually put in effect rules and regulation and laws that actually allow that [individual] market to come back together again,” he said, an idea that would surely roil Mr. Obama’s plans to build balanced exchanges through his law.

GOP lawmakers insisted they like to scrap the whole law, despite their vote to amend Obamacare’s problems.

“It is merely to stop the bleeding,” Rep. Michael Burgess, Texas Republican, said.