Lincecum escaped a first-inning jam with a strikeout/caught-stealing double play, but the Dodgers put eight consecutive batters on base in a five-run second inning with three consecutive hits off Lincecum, the rest reaching base off reliever Steve Edlefsen.
Non-roster invitee Jeremy Moore and Skip Schumaker contributed two-run doubles. Hanley Ramirez singled in the fifth run. Lincecum was charged with three runs in 1 1/3 innings, Edlefsen with two runs in two-thirds of an inning.
San Francisco scored in the third inning on a two-run double by Brandon Belt off J.P. Howell. The Giants closed the gap to 5-3 on Brett Pill's one-out homer off Dodgers closer Brandon League in the fourth inning.
Guillermo Quiroz cut the margin to a run in the sixth inning with a two-out RBI single to score Roger Kieschnick, who doubled. Brock Bond clubbed a two-run homer in the ninth, and Pill tied it with another two-run shot.
Yusmeiro Petit pitched two scoreless innings of relief for the Giants.
Up next: Aaron Harang, already the subject of trade rumors, makes his first showcase start of the season Wednesday when the Dodgers travel to Mesa to play the Cubs. Harang, who has trimmed down and toned his body in the offseason, appears to be out of a starting spot with the acquisitions of Zack Greinke and Hyun-Jin Ryu.
Ken Gurnick is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.