Ms. Pelosi called a meeting with other party leaders Tuesday afternoon, and several senior Democrats said there was a jittery feeling in her camp.

“We just got a shellacking last Tuesday,” said Representative G.K. Butterfield, Democrat of North Carolina and the chairman of the Congressional Black Caucus. “We got an unexpected defeat, and we’ve got to recalibrate and decide how we go forward.”

Democrats were especially stung by Mrs. Clinton’s loss among working-class voters. “We’re the party of Franklin Roosevelt,” said Representative Brendan Boyle of Pennsylvania. “We should not be struggling as a party the way we are with working-class voters. And the fact that we are signals that we need to talk.”

The battle reflects a larger debate within the Democratic Party — being played out in its choice for the next chairman of the Democratic National Committee — pitting those who want to rebuild the base of President Obama’s support among newer and more diverse voters and those who want to court anew the party’s white working-class voters, especially in the Midwest.

Among Republicans, there was ambiguity of a different sort as they struggled to determine who was in charge of Mr. Trump’s policy agenda. For now, it appears that Vice President-elect Mike Pence is making the calls to Capitol Hill.

“Nobody really knows,” former Speaker John Boehner said of Mr. Trump’s agenda in an interview with CNBC. He added, “He is barely a Republican. He could barely be a Democrat as well. Nobody really knows where he is going.”

Other Republicans were generally positive about the prospects of a government in their full control, in spite of the early signs of a bumpy transition. Most Republicans said they knew nothing about Mr. Bannon and had little knowledge of his background. “I really have only met him once,” said Representative Peter King, Republican of New York. “People I’ve spoken to in the campaign have a high regard for him. That’s really all I know.”