With the go-ahead run on third, the Phillies countered Bruce Bochy's pitching change for left-hander Javier Lopez with Jeff Francoeur.
Francoeur has stepped up in clutch situations before this season and delivered again in the seventh inning.
Francoeur's two-run double broke the tie and helped the Phillies salvage the series finale against the Giants with a 6-4 win on Sunday afternoon at Citizens Bank Park.
The Giants opened the scoring in the second with an RBI groundout by Matt Duffy.
The Phillies would take the lead as two runs scored on an RBI single by Cody Asche in the bottom of the second.
Back-to-back doubles by Joe Panik and Angel Pagan helped plate a run to tie the game in the third. An RBI groundout by Brandon Belt gave the Giants the lead again moments later.
Odubel Herrera belted a solo home run to center to tie the game in the bottom of the third.
Sean O'Sullivan lasted six innings allowing three runs on seven hits. He took a no-decision.
The Phillies reclaimed the lead in the seventh as Francoeur delivered a two-run double to the corner in left.
In the eighth, Maikel Franco continued his hot stretch with a solo home run to center, extending the lead to three.
The Giants cut into the lead in the ninth, getting an RBI single from Buster Posey. But Jonathan Papelbon finished off the save, securing the win.
The Phillies head on the road to Cincinnati for a three-game series starting on Monday. First pitch of the opener is at 7:10 p.m.
Out of the 'Pen
At the Plate:
Kevin Durso is a contributing writer and editorial assistant for Philliedelphia. Follow him on Twitter @Kevin_Durso.