SAN FRANCISCO (AP) - Joe Panik hit a game-tying single off Los Angeles closer Kenley Jansen with one out in the 10th inning and scored on Buster Posey's RBI single, and the Giants beat the Dodgers 5-4 on Saturday night.
Adrian Gonzalez homered leading off the 10th to put the Dodgers up 4-3 before the Giants rallied to win with four consecutive hits off Jansen (2-2).
Denard Span started the comeback with a one-out double. Panik singled in Span to tie the game and Brandon Belt followed with a bloop single to right. Posey then lined an 0-1 pitch to left center as Panik scored easily.
Chris Stratton, the ninth pitcher used by Giants manager Bruce Bochy, retired three batters for his first major league win.
It's San Francisco's sixth walkoff win this season and their second against Los Angeles.
Gonzalez, Justin Turner and Trayce Thompson had two hits apiece for the Dodgers, who lost for the third time in five games.