Updated

Los Angeles Dodgers manager Don Mattingly appears to be the favorite for National League Manager of the Year and his club is closing in on its first NL West title since 2009.

Things weren't going so smoothly early on this season for the Dodgers, who have resurrected themselves over the past few months and look to take a 2-0 lead in this four-game series Friday versus the San Francisco Giants.

The Dodgers, whose magic number to clinch a division title is five, posted a 3-2 win in 10 innings Thursday night thanks to Adrian Gonzalez's game-winning RBI single in the bottom of the 10th. Gonzalez hit a ball up the middle under a diving Brandon Crawford and Carl Crawford came around to score the winning run to lift Los Angeles to its third win in four tries since a four-game skid.

"I take it like any other at-bat with runners in scoring position. It's a great feeling to get a walk-off," Gonzalez said.

Yasiel Puig and Mark Ellis had an RBI apiece and former Giants closer Brian Wilson worked around a walk in the top of the 10th for the win. Wilson pitched for San Francisco from 2006-12. Dodgers starting pitcher Zack Greinke was sharp through the first six innings, allowing one run and four hits with five strikeouts and two walks for the no-decision.

Dodgers shortstop Hanley Ramirez left Thursday's game with what the club described as mild tightness in his left hamstring. Ramirez was 1-for-3 with a strikeout and is day-to-day.

The Dodgers lost the last time ace Clayton Kershaw took the mound in Sunday's 3-2 defeat at Cincinnati and hope the left-hander can revert back to his winning ways Friday night. Kershaw pitched well in the no-decision, yielding a pair of runs in seven innings, and is 4-1 in his past five decisions. Kershaw is 14-8 in 30 starts this season and 9-3 with a 1.75 ERA in his last 14.

Kershaw leads the majors with a sparkling 1.92 ERA and has faced San Francisco four times this season, going 3-0 with a 1.13 ERA. The southpaw, who is 7-5 in 15 home starts in 2013, is 11-4 with a 1.32 ERA in 21 career matchups (20 starts) with the Giants.

San Francisco kicked off a 10-game road trip with Thursday's tough loss after going 4-3 on a recent homestand.

Jeremy Affeldt, who was reinstated from the disabled list, served up Gonzalez's game-winning hit and starting pitcher Matt Cain battled Greinke for mound supremacy, allowing two runs -- one earned -- and six hits in seven innings for a no-decision.

"I felt good, I threw a lot of strikes and I got into a good rhythm," Cain said.

Hunter Pence homered and Gregor Blanco ended 3-for-4 with an RBI for the defending World Series champions. Blanco's RBI single in the ninth inning tied the game, while Pence has two homers and eight RBI in his past three contests.

The Giants will also visit both New York clubs on their junket and hope Madison Bumgarner can cool off the Dodgers Friday night. The Giants are only 1-6 in his last seven starts and Bumgarner is 0-3 with a 3.27 earned run average in that time. He has recorded consecutive no-decisions and tossed six shutout innings of a 3-2 win over Arizona on Sunday.

In 29 starts this season, Bumgarner has a record of 11-9 to go along with a 2.82 ERA and will face the Dodgers for the fourth time this season. The left- hander is 2-1 over the first three meetings against L.A. and 7-3 with a 2.54 ERA in 11 career games (10 starts) in this series.

Los Angeles is 7-6 against San Francisco this season and has prevailed in six of the past seven meetings between the NL West foes.