While Judge Gorsuch may be working to allay those concerns — under the current Senate rules, he needs some Democratic support to be confirmed — Mr. Trump’s Twitter post and Mr. Spicer’s denials confirmed the worst suspicions of Democrats who were already bent on transforming the process into a referendum on the president.

Senator Chuck Schumer, Democrat of New York and the minority leader, said he had called on Judge Gorsuch in their private meeting on Tuesday to publicly condemn Mr. Trump’s comments about judges.

“He said, ‘Well, I’m disheartened by it,’” Mr. Schumer said. “I said, ‘Your feelings aren’t enough here.’ It’s really not good enough whispering behind closed doors that you’re disheartened. I didn’t think it came close to being enough.”

Senator Ben Sasse, Republican of Nebraska, said he, too, had questioned Judge Gorsuch about the president’s attacks, particularly his reference to a “so-called judge.” Mr. Trump has also called the courts “so political” and said that the judges weighing his travel ban had questioned legal principles that even “a bad high school student would understand.”

Mr. Sasse said on the Senate floor that Judge Gorsuch “got a little bit emotional, and he said that any attack or any criticism of his brothers and sisters of the robe is an attack or a criticism on everybody wearing the robe as a judge.”

“I think that’s something that this body should be pretty excited to hear someone say who’s been nominated to the high court,” he added. “He said that it is incredibly disheartening to hear things that might undermine the credibility and the independence of the judiciary.”

Mr. Trump’s allies suggested that Democrats were seeking to use Judge Gorsuch as a political pawn in their battle with the president over the executive order on immigration, which could well end up before the Supreme Court.