“There aren’t a lot of states that felt more pain than folks right here in Virginia,” the president said. Citing an interview that Mr. Cuccinelli gave on Friday agreeing that the shutdown seemed to be in the rearview mirror, Mr. Obama said, “If you would embrace the very politics that led to this shutdown, then I guarantee it’s not in the rearview mirror of voters in Virginia.”

Both candidates for governor are in the last stages of turning out supporters, pleading for volunteers to knock on doors and traversing the state with political celebrities to inspire their base. Mr. McAuliffe, who appeared with Bill Clinton last week, is scheduled to campaign on Monday with Vice President Joseph R. Biden Jr. Mr. Cuccinelli will appear with Senator Marco Rubio of Florida and, in an election eve rally in Richmond, with Ron Paul, a former congressman and Republican presidential candidate.

Stumping on Saturday with Gov. Scott Walker of Wisconsin, an anti-union hero to many conservatives, Mr. Cuccinelli thanked an outdoor crowd on a lovely fall day “for coming out in this awesome door-knocking weather.”

“We don’t need to convince one more Virginian,” Mr. Cuccinelli told about 150 supporters in Spotsylvania Courthouse. “We just have to get the ones who already agree with us to go to the polls.”

Image Terry McAuliffe

Since Day 1, the McAuliffe campaign has been acutely aware that the voters who turn out for off-year elections have historically been older, whiter and more conservative than those who vote in presidential years, a trend favoring Mr. Cuccinelli.

To increase turnout by the coalition of young people, women and minorities that put Virginia in Mr. Obama’s column a year ago, McAuliffe strategists imported the playbook and some players from his re-election race. It has used its vaunted analytics to identify potential supporters, and it has turned to social science to get them to vote. Field staff members ask supporters how they plan to get to the polls — Before or after work? By car or public transit? — because data shows that having a plan to vote increases actual voting by 9 percent, said Michael Halle, a campaign organizer.