Going state by state over the political map, Ms. Pelosi said she expected Democrats to capture three or four Republican-held seats in Pennsylvania, between two and four in New Jersey and up to three in Illinois, people who attended the event said, speaking anonymously to discuss a private conversation. In several smaller states, Ms. Pelosi predicted a Democratic sweep of the most competitive congressional races, including gains of two seats each in Iowa and Kansas, and one seat in New Mexico.

That supremely optimistic outlook on the night reflects just how high Democratic hopes have risen for a takeover in the House, and one person who attended the event expressed surprise at just how far Ms. Pelosi went in the direction of predicting a robust victory. Most leaders in both parties now expect Democrats to take the majority, but even confident Democratic officials have been largely restrained in forecasting the scale of gains they anticipate.

[Read more about Nancy Pelosi on the campaign trail]

Still, Ms. Pelosi urged Democrats not to take victory for granted even over the final hours of the campaign, and cautioned that they should not be surprised if Mr. Trump attempts to question the legitimacy of the election. She noted that Democrats have deployed hundreds of lawyers around the country to address any issues of election integrity.

Mr. Trump has repeatedly made baseless claims of voter fraud in the past, including in the aftermath of his own 2016 victory.

Looking past an anticipated victory, Ms. Pelosi said a Democratic majority in the House would swiftly tackle issues of government ethics, infrastructure spending and health care.