With lawmakers cleared out of Washington and no end to the impasse in sight, some speculated that it would be left to Democrats to reopen the government when they take over the House next month. In an interview Saturday morning, Representative Nancy Pelosi of California, the Democrats’ nominee to be speaker, vowed that they would do just that.

“We have certainty,” Ms. Pelosi declared. “We will end this the first week in January.”

The shutdown that began Saturday was the third of Mr. Trump’s 23 months in office and an ignominious end to a year that began much the same way, with a three-day government shutdown in January.

The latest breakdown, which hinges almost entirely on the impulses of a mercurial president, only added to the sense that, as Senator Claire McCaskill, the departing Democrat from Missouri, said in her recent farewell speech, “something is broken, and if we don’t have the strength to look in the mirror and fix it, the American people are going to grow more and more cynical.”

With Senate Democrats saying they will never accede to Mr. Trump’s insistence on the $5 billion for his wall, and the White House offering no indication that the president will accept less, nine of the federal government’s 15 cabinet-level departments have officially shuttered. They include the Departments of Agriculture, Commerce, Homeland Security and the Interior; other agencies, like the Defense Department, are unaffected because Congress had already approved their spending.