The bill was approved by a vote of 387 to 35. The current authorization to spend money from the federal Highway Trust Fund, which finances most aid to states, expires May 31. A Senate vote is expected later this week.
The fund relies on revenue from the 18.4-cents-a-gallon federal gasoline tax, but the tax hasn't been increased since 1993 and the money it brings in isn't enough to cover transportation spending. But most lawmakers are reluctant to raise it, seeing that as unpopular with voters.
Unable to find a politically acceptable solution, Congress has kept the trust fund teetering on the edge of insolvency since 2008. The extension passed by the House would expire July 31, when many lawmakers say they expect to go through the same exercise again.
Several top House and Senate Republicans have indicated they hope to find enough money to put an end to the temporary patches as part of a larger effort to rewrite tax laws. But broad tax legislation is notoriously difficult to pass even without the complication of finding a transportation spending solution.
"If we don't change something, we'll be right back here in July talking to each other" about another extension, said Rep. Bill Pascrell, D-N.J., who argued against the bill.
Rep. Bill Shuster, R-Pa., chairman of the House Transportation and Infrastructure Committee and the bill's chief sponsor, acknowledged the two-month extension is less than ideal, especially since it expires in the middle of the summer construction season. Uncertainty over whether they can count on federal aid has already caused some states to cancel or delay millions of dollars in construction projects.
Rep. Peter DeFazio, D-Ore., urged colleagues to raise the federal gas tax, saying 14 states have raised theirs since 2013 "and nobody lost their election because they voted for a gas tax increase."
The White House said in a statement that it wasn't opposed to the extension, but urged lawmakers to "use this two-month extension to make meaningful and demonstrable progress toward a significant bill."
During debate on the extension, Democratic lawmakers introduced a bill proposed by the White House that would spend $478 billion on transportation over six years, a 45 per cent hike over current spending. The spending increase would be paid for by closing loopholes that allow U.S. corporations to avoid paying taxes on foreign earnings by parking the profits overseas.
The House rejected an effort by Democrats to add $750 million to the bill to help passenger railroads install safety technology known as positive train control, which the National Transportation Safety Board has said could have prevented last week's deadly Amtrak derailment in Philadelphia, had it been in place.
"This really is not the place to address this," said Shuster, speaking against adding the additional money. "We need to pass this (extension) and get it to the Senate so that we make sure these vital programs keep people working, keep (construction) projects moving forward so that they don't shut down."
Follow Joan Lowy on Twitter at http://www.twitter.com/AP_Joan_LowySuggest a correction