Schwarber also homered, as did teammate Bryson Stott, who had two hits.
The game was delayed by rain for 2 hours, 56 minutes by rain at the start.
Philadelphia's J.T. Realmuto added a two-run double while Bryce Harper had two hits and an RBI. Brandon Marsh also had two hits for the Phillies, who won the last three games of the four-game series
Phillies starter Zack Wheeler gave up five hits and three runs with seven strikeouts and no walks in seven innings
Jeff Hoffman (3-1) tossed two scoreless innings to earn the win.
Ha-Seong Kim hit a home run and a double and Xander Bogaerts also homered for the Padres
Fernando Tatis Jr. added a two-run single and Trent Grisham hit two doubles and drove in a run.
Padres manager Bob Melvin was ejected in the 12th inning for arguing a clock violation
Padres starter Seth Lugo tossed 5 1/3 innings and allowed five runs and seven hits with five strikeouts and no walks
Tim Hill (1-4) took the loss.
Tatis' pinch-hit, two-run single tied the game at 5 in the eighth. Tatis didn't start after twisting an ankle in Game 2 of the teams' Saturday doubleheader.
The Padres took a 6-5 lead in the 10th when Juan Soto hit a sacrifice fly to center to score Grisham
Harper hit an RBI single off Josh Hader with two outs to equalize at 6 in the bottom of the 10th.
The Padres went ahead 1-0 in the first when Kim lofted a leadoff home run to left field. It was his 11th homer of the season
Marsh tripled with two outs in the second but was stranded when Drew Ellis struck out looking.
In the fourth, the Padres took a 2-0 lead when Bogaerts hit a solo homer to left. It also was 11th of the campaign
San Diego increased its advantage to 3-0 in the fifth when Grisham hit an RBI double to left.
Stott homered to right to open the fifth and the Phillies closed within 3-1. He has eight blasts this season
In the bottom of the sixth, Schwarber crushed a solo homer to right to slice the deficit to 3-2. It was Schwarber's 25th homer of the season. Realmuto soon added a two-run double and the Phillies rallied for a 4-3 lead
Later in the frame, Ellis walked with the bases loaded against Tom Cosgrove and the Phillies led 5-3
--Field Level Media