The public spectacle that will surround Dr. Blasey’s testimony on Thursday illustrates the degree to which a confirmation effort that was once seen as an island of functionality in a tumultuous White House has become the latest messy episode in a presidency full of them. The development could carry profound consequences not only for the future of the Supreme Court but also for Republicans facing the growing possibility of losing control of Congress in November, partly at the hands of female voters.

As the risk that Judge Kavanaugh’s nomination could collapse has mounted — a new allegation of sexual misconduct published by The New Yorker on Sunday night raised fresh questions about whether he could survive — Mr. Trump has been forced into the role of spectator.

The president was briefed on the allegation on Sunday, according to people in contact with him, and was remaining firmly behind Judge Kavanaugh, who is also scheduled to testify before the committee and who has vehemently denied the allegations. But one of the people said the president argued that the new charge showed why the White House should have fought back against Dr. Blasey from the beginning.

In a sign that the White House was prepared to take a more aggressive approach to the newly lodged accusations against Judge Kavanaugh, White House officials sent out a document around midnight on Sunday casting doubt on the article with a point-by-point list of rebuttals.

The agreement to hear Dr. Blasey’s testimony was sealed after days of frenzied, bitter negotiations that left Mr. Trump and his team believing that his own party had allowed itself to be exploited. For Mr. Trump, the hearing is dangerously unpredictable, carrying the potential to tarnish not only Judge Kavanaugh but also the Republican Party itself weeks before the election.