Shane Victorino had two hits and Carlos Ruiz homered for the Phillies. Philadelphia won in the bottom of the ninth when second baseman Eugenio Velez couldn't handle Geoff Jenkins' sharp grounder, allowing Ryan Howard to score from second.
Brad Lidge (1-0) pitched a scoreless ninth for the win.
Keiichi Yabu (2-2) took the loss for the Giants. Yabu walked Howard and Burrell with two outs, setting up Jenkins' at-bat.
Burrell is second in the National League with 30 RBIs and has reached base in 30 straight games. His two-run double in the third inning scored Victorino and Eric Bruntlett for a 2-0 advantage.
San Francisco tied the game at 2 in the fourth on an RBI single by Jose Castillo and an RBI double by Rich Aurilia.
The Phillies eventually went ahead 4-2 on a pair of unearned runs in the fifth—a wild pitch by Tim Lincecum, which allowed Victorino to score and a sacrifice fly by Geoff Jenkins, scoring Bruntlett.
Aurilia was 3-for-3 for the Giants with two doubles and a two-run home run off Cole Hamels in the sixth, tying the game at 4. Aurilia extended his hitting streak to seven games, going 10-of-21 over that span. Hamels gave up four runs and seven hits in six innings.
Lincecum entered the game with a 1.73 ERA, third-best in the NL, as well as a league-leading 0.52 road ERA. He allowed four runs, all unearned, and actually lowered his overall ERA to 1.49. Lincecum pitched six innings and allowed six hits to go along with five strikeouts and two wild pitches.