The provision imposes a tax on employment-based health insurance coverage that exceeds certain thresholds — $10,200 for individual coverage and $27,500 for family coverage. All health insurance benefits paid by employers above that amount would be taxed at 40%.

"Passage of this bill will lift the shadow that overhangs employer-sponsored plans and stop the high deductible trend from worsening," Courtney said Wednesday afternoon before the vote. "I am hopeful an overwhelming tally tonight will send a laser light message to the Senate to adopt this bill as soon as possible."

The "Middle Class Health Benefits Tax Repeal Act of 2019" had more than 350 co-sponsors and was expected to pass the Democratic-controlled House on Wednesday afternoon. Rep. Joe Courtney, D-Conn., who introduced the bill earlier this year and has spent years trying to repeal the provision in the health law, has said the tax would put workers and their families' health coverage at risk.

The tax, set to go into effect in 2022, is unpopular with both Republicans and Democrats, who say it punishes the middle class.

The House voted Wednesday night to pass a bill that would scrap Obamacare's so-called Cadillac tax, an inactive provision of the health law meant to help control health-care spending.

The provision was meant to slow overall health spending by discouraging employees from selecting pricey insurance plans with lavish health benefits that could encourage overusing medical services. It was also designed to generate revenue for the U.S. government, which would then use that money to fund other Obamacare programs.

The tax "has a strong policy rationale," wrote Paul Van de Water, senior fellow at the Center on Budget and Policy Priorities, a Washington think tank. "In fact, it's one of the ACA's most important cost-containment measures. It will discourage employers and employees from buying unusually high-cost health coverage that promotes the excess use of health care."

Repealing it would also cause the U.S. to lose a "substantial amount of money and add to our deficit," he added in an interview with CNBC.

But lawmakers and labor unions were concerned the tax would cause employers to reduce health benefits or burden workers with an increase in cost-sharing. There are also concerns it would unfairly target high-cost health plans that cover people in poorer health or people who live in areas where health costs are high.

The Kaiser Family Foundation found that 21% of employers who offer high-cost health plans would be affected when the the Cadillac tax is expected to go into effect in 2022. The percentage of employer plans reaching the threshold will grow to 37% by 2030, KFF said.

Implementation of the tax has been delayed twice by Congress — once in 2015 and again in 2018 as part of a spending bill.

If the tax is fully repealed, it could cost the U.S. an estimated $193 billion over the next 10 years, according to the Congressional Budget Office. It's unknown whether the Senate will consider the bill but a Senate version of the repeal has more than 40 co-sponsors.

The vote Wednesday comes as a Trump administration-backed lawsuit attempts to throw out the entire health-care law.

Led by the state of Texas,18 Republican state attorneys general argued last week that a federal appeals court should uphold a ruling in December from a federal judge in Texas that struck down the law. They say law is unconstitutional because of the move by Congress in 2017 to eliminate the so-called individual mandate, which imposes a tax penalty on uninsured taxpayers and was considered a cornerstone of the health law. A coalition of Democratic state attorneys general, led by California's Xavier Becerra, appealed the lower court ruling and are defending the health law.

WATCH: Obamacare enrollment first--stability