PHILADELPHIA — President Obama implored voters to cast aside cynicism and turn out to elect Democrats who are “fighting for you,” making his closing argument before midterm congressional elections that will shape the contours of his final two years in office.

“You’ve got to ask yourself: Who’s going to be fighting for you? Who’s going to be on your side?” Mr. Obama said Sunday evening to about 5,500 people in an arena at Temple University in Philadelphia during his final rally before the balloting.

Campaigning before a mostly African-American crowd for Tom Wolf, the Democrat with a substantial lead in his race against Gov. Tom Corbett, a Republican, Mr. Obama acknowledged that he was “preaching to the choir,” but pleaded with his supporters to turn out on Election Day. “Y’all have to vote. That’s what this comes down to,” the president said, as supporters hoisted the giant letters “V-O-T-E” behind him.