President Trump sure seems serious about his opposition to the Gateway tunnel project — or at least, to how much he has to pay for it.

On Thursday, sources reported that Trump is threatening to veto Congress’ $1.3 trillion spending bill — needed to keep the government running beyond March 23 — if it includes funding for the cross-Hudson rail tunnel.

If Trump is doing this simply to slam Sen. Chuck Schumer, the tunnel’s top congressional advocate, he’s badly off-base.

A whole lot of commuters depend on the 108-year-old existing tunnel, the only major rail link between New Jersey and Manhattan. It’s at increasing risk of collapse; if it goes down, last week’s commuter-train service outages will seem like a picnic.

It’ll also be a major problem for travelers and businesses up and down Amtrak’s Boston-Washington corridor.

At the very least, Trump should rethink his veto threat — which could leave him shutting down the federal government simply to stop the first down payment on the tunnel.

That’s right: The bill only includes a $900 million installment for the Hudson rail crossing, enough to get key early work started.

Which means that the president will still have plenty of leverage to get the substantial changes he wants — which seem to be mainly getting New York and New Jersey to put in more cash.

Transportation Secretary Elaine Chao made that clear last week. She told a congressional committee that, yes, the president is personally intervening to kill the budget bill, because he “is concerned with the viability of the [Gateway] project and the fact that New York and New Jersey have no skin in the game,” said Chao. Both states “need to step up and bear their fair share.”

But: “This is not a project that should be killed,” a Chao spokesman made clear. “What we simply are stating is that it needs some funding equation.” Translation: Let’s make a deal!

Metro-area pols believed they had a deal with President Barack Obama: Washington would cover half the cost of the tunnel, and the two states would fund the other half — albeit, largely with money borrowed from . . . the feds.

But Obama is gone, and Trump wants a better offer from New York and New Jersey. If the project is truly so important (it is), why not make him one?

Chao suggested the states “come up with larger than zero or 5 percent” in non-federal funds.

NJ Transit has already offered to boost fares to provide cash for the project, and Gov. Cuomo similarly suggested tapping “the new infrastructure revenues and offsets.”

Trump should back off his veto threat, but Cuomo and New Jersey Gov. Phil Murphy will have to show flexibility, too.