Increasing the gasoline tax for the first time in 25 years is the only way to pay for President Donald Trump's $1.5 trillion infrastructure upgrade, former Transportation Secretary Ray LaHood said Wednesday.

Trump has expressed a willingness to explore raising fuel taxes by 25 cents a gallon. The federal tax has been 18.4 cents (24.4 cents for diesel) since it was last raised in 1993.

"I'm for Trump on this one," LaHood told CNBC's "Squawk Box." LaHood, a former congressman from Illinois, was one of the Republicans who served in former President Barack Obama's Cabinet.

LaHood said he believes Trump is listening to the Chamber of Commerce, which has been a vocal supporter of raising the gas tax.

The president faces opposition on the issue by Republican leaders on Capitol Hill and major GOP donors including billionaire brothers Charles and David Koch.

LaHood said it's the "only way to get the money" for Trump's much-needed plan to bring U.S. infrastructure systems — roads bridges and airports — up to modern standards.

Citing Trump's support of the new tax law, LaHood said it's hard for Republicans to say no when the White House gets behind something. "I give him credit on his vision" on the gas tax hike, he added.

Last week, anti-tax crusader Grover Norquist, president of the right-leaning Americans for Tax Reform, told CNBC a gas tax hike is "going absolutely nowhere."