WEST PALM BEACH, Fla. — President Trump is pressing congressional Republicans to oppose funding for a new rail tunnel between New York and New Jersey, using the power of his office to block a key priority for the region and his Democratic rivals, according to several people with knowledge of his actions.

Mr. Trump urged Speaker Paul D. Ryan this week not to support funding for the $30 billion project, two people familiar with the conversation said.

The president’s decision to weigh in forcefully against the so-called Gateway infrastructure project, which has been one of the United States’ top transportation priorities for years, adds a significant obstacle to getting the project underway in the near future.

Mr. Trump’s opposition to the project is in part the result of his belief that it is important to Senator Chuck Schumer of New York, the Democratic leader, according to one person with knowledge of the president’s thinking on the issue.