Kershaw (10-6) allowed a run and six hits, struck out eight and walked none, dropping his major league-best ERA to 1.96. The 2011 NL Cy Young Award winner is 5-1 with a 1.72 ERA over his last six starts after going 0-3 in his previous six outings.
Kenley Jansen got three outs for his 13th save in 16 chances.
Bailey (5-10) lost his fourth straight since his no-hitter. He allowed two runs and seven hits in seven innings, struck out five and walked one.
CUBS 3, GIANTS 2
SAN FRANCISCO (AP) — Julio Borbon and Junior Lake scored on an error by San Francisco first baseman Brandon Belt in the ninth inning and the Chicago Cubs rallied to win.
Borbon singled leading off the ninth against closer Sergio Romo (3-5) and moved to second when pinch-hitter Dioner Navarro walked. After David DeJesus struck out, Lake reached on a fielder's choice. Anthony Rizzo then hit a sharp liner that went through Belt's legs and into the right field corner.
The Cubs rallied to win when trailing after eight innings for just the fourth time this season. Matt Guerrier (4-4) retired four batters for the win. Kevin Gregg worked the ninth for his 20th save.
Jeff Francoeur had two hits for the Giants, who lost for the fifth time in six games. Pablo Sandoval and Hunter Pence both doubled and scored for San Francisco, which dropped a season-high 10 games below .500.