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.

Mr. Spicer said that when Judge Gorsuch told senators that he considered such criticism “demoralizing” and “disheartening,” he was referring broadly to any such attacks on the judiciary.

“The judge was very clear that he was not commenting on any specific matter, and that he was asked about his general philosophy,” Mr. Spicer told reporters during a series of testy exchanges. “So you can’t then take that and equate it back to the specific. He literally went out of his way to say I’m not commenting on a specific instance.”

On Thursday, former Senator Kelly Ayotte, Republican of New Hampshire, who is helping with the confirmation process, issued a statement in which she said of Judge Gorsuch, “While he made clear he was not referring to any specific case, he said that he finds any criticism of a judge’s integrity and independence disheartening and demoralizing.”

Mr. Trump lashed out on Twitter at Senator Richard Blumenthal of Connecticut, who first revealed Judge Gorsuch’s remarks after meeting with the nominee on Wednesday. The president noted that Mr. Blumenthal had lied about his service in the Vietnam War and suggested that he had also misstated his exchange with the judge.

The White House’s statements upended what had appeared to be a carefully calculated effort by Judge Gorsuch to gently distance himself from Mr. Trump’s attacks — what some observers saw as an attempt to blunt Democrats’ concerns about whether the judge would stand up to what they call Mr. Trump’s overreach.

While Judge Gorsuch may be…