WASHINGTON — White House officials insisted on Thursday that Judge Neil M. Gorsuch, President Trump’s Supreme Court nominee, was not referring to Mr. Trump’s recent denigration of judges when he said privately that he was disheartened by attacks on the courts.

Mr. Trump said on Twitter that the nominee’s remarks had been misrepresented, a sentiment echoed by the White House press secretary, Sean Spicer, during a contentious briefing. A day before, members of the White House team guiding Judge Gorsuch’s confirmation verified that the judge had expressed his dismay in response to questions about Mr. Trump’s insults of judges.

The administration’s abrupt shift highlighted the degree to which Judge Gorsuch’s nomination — a top priority for the president and his core supporters — has become mired in a broader debate over Mr. Trump’s attitude about the constitutional principle of judicial independence.

The president’s feud with the judiciary — he referred to the district court judge who blocked his targeted travel ban as a “so-called judge” and called an appeals court hearing “a disgrace” — is dominating the Senate’s consideration of Judge Gorsuch’s nomination. Senators from both parties are demanding that the judge answer for the president who named him.