Mr. McConnell on Wednesday sought to play down the friction between himself and the president, issuing a statement in which he insisted that their common legislative priorities were on track.

“The president and I, and our teams, have been and continue to be in regular contact about our shared goals,” Mr. McConnell said. “We are working together to develop tax reform and infrastructure legislation so we can grow the economy and create jobs; to prevent a government default; to fund the government so we can advance our priorities in the short and long terms; to pass the defense authorization and defense appropriations bills so we can support our troops and help implement an effective strategy against ISIL; to provide relief from Obamacare; and to continue our progress for our nation’s veterans.”

Sarah Huckabee Sanders, the White House press secretary, echoed that statement and said the president and Mr. McConnell “will hold previously scheduled meetings following the August recess to discuss these critical items with members of the congressional leadership and the president’s cabinet.”

But there is growing evidence of tensions that have erupted privately between the president and other senior Republicans as well. In a testy call this month, first reported by Politico, Mr. Trump vented angrily to Senator Bob Corker, Republican of Tennessee and the chairman of the Foreign Relations Committee, over Russia sanctions legislation he said would damage his presidency, according to a person familiar with the conversation. Mr. Corker insisted that he would not back down on the measure, which passed with overwhelming bipartisan support.

Mr. Trump’s threat on Tuesday of a shutdown introduced new uncertainty to the ambitious wish list. It sharpened a suggestion that Mr. Trump made early this year, in the wake of a budget agreement he grudgingly accepted even though it omitted money for the wall, that the United States needed “a good ‘shutdown’” this fall to force a partisan confrontation over federal spending.

Mr. Trump has asked Congress to allocate $1.6 billion this year toward building a wall along the roughly 1,900-mile border with Mexico. Currently, a mix of barriers — from chain-link fences and steel walling that keep people from crossing to steel beams to stop vehicles — stretch across about 650 miles of the border. So far, Congress has provided $341 million this year to repair and bolster the existing border barriers.