Crawford snapped a 2-for-22 skid with his two-out hit off the wall in left-center field and finished with four RBIs. Buster Posey, who doubled and scored in the 14th, sent the game into extras with a solo homer in the ninth off Jonathan Papelbon, who blew his third save.
George Kontos (3-0) earned the win for the second straight night. Lincecum, San Francisco’s ninth pitcher, got the final two for the save in a game that ended close to 1 a.m. Jeff Manship (1-2) surrendered four runs and lost.
The Giants (56-44) improved to 8-2 in extra-inning games and 6-0 on the road. The Phillies (43-57) fell to 6-7.
Posey had four hits, including two doubles, two runs and an RBI. Hunter Pence had three hits, including a fifth-inning homer.
Pence is a lifetime .353 hitter with 14 homers in 34 games against Philadelphia.
Jimmy Rollins hit a two-run homer in the fifth, giving him five homers and 13 RBIs in his last 10 games.
Marlon Byrd had a pair of RBIs on a double and a groundout and made a great leaping catch into the right-field wall to rob Gregor Blanco of extra bases in the sixth.
Yusmeiro Petit, making a spot start for injured Matt Cain, allowed seven hits across five innings, struck out five and walked two.
Roberto Hernandez limited San Francisco to three runs on five hits over 5²⁄³ innings, walked three and struck out one.
Ken Giles allowed one run in the seventh after entering the game with a 14²⁄³-inning scoreless streak.
Ben Revere had three hits and two stolen bases.
NOTES: Giants 2B Joe Panik was pulled in the second inning. He suffered a right ankle sprain while running out a grounder in the first inning and is considered day-to-day. ... Philadelphia placed outfielder John Mayberry Jr., a former Stanford star, on the 15-day disabled list with left wrist inflammation and recalled outfielder Darin Ruf from Triple-A Lehigh Valley. ... San Francisco OF Angel Pagan (back) took swings off a tee Monday, manager Bruce Bochy said. Pagan has not played since June 14. ... One day after returning from a two-month DL stint because of a strained left elbow, Phillies LHP Cliff Lee felt fine Tuesday. “Some ordinary soreness in his legs,” manager Ryne Sandberg said. “Nothing with the arm at all.” ... Giants 1B Brandon Belt (concussion) is progressing slowly and could start taking swings in a couple days, Bochy said.