SAN FRANCISCO (AP) -- Jay Bruce needed time to recover from his knee surgery in May. Since June rolled around, he's been almost unstoppable.
''Billy is a catalyst on this team,'' Bruce said. ''When he's on base, things happen.''
Johnny Cueto (8-5) pitched a three-hitter over 8 1-3 innings and the Reds won their third straight and sixth of seven overall.
''When he's sharp he's fun to watch,'' Reds manager Bryan Price said. ''He's a high ground-ball pitcher and got a lot of early contact.''
Bruce began heating up along with the weather, turning a .192 in late May to his current .244 following a hot June.
''The knee surgery took some time, but even when I came back I was playing very well,'' Bruce said. ''It's a long season and you have to keep working.''
Bruce is hitting .315 for the month (28 for 89) and has driven in 10 runs over his last nine games.
''I have an approach I think works and I keep chipping away,'' Bruce said.
Cueto walked two and struck out three, allowing both runs and raising his majors-leading ERA from 1.86 to 1.88.
''We raised his ERA,'' Giants manager Bruce Bochy said. ''That goes to show you just how good he is.''
Aroldis Chapman got the final two outs for his 16th save in 17 chances.
''We're getting good at-bats up and down the lineup,'' Price said. ''We've seen it all come together in June.''
The NL West-leading Giants lost for the 13th time in 17 games. Their once commanding 9 1/2 game lead has dwindled to two after losing for the 10th time in 12 home games.
Pinch-hitter Tyler Colvin tripled to drive in the Giants' first run in the sixth and later scored on Pence's groundout.
Cueto faced the minimum over the first four innings. Pablo Sandoval reached on second baseman Brandon Phillip's first error in 69 games and was erased on a double play in the second.
Madison Bumgarner (9-5) gave up a season-high five runs on nine hits, matching his season high. He walked one and struck out three.
Bumgarner needed just 53 pitches to get through four scoreless innings and then threw 26 in the fifth, allowing all five of his runs as the Reds sent 10 men to the plate.
''I felt like I did a good job of staying poised, but it kept snowballing,'' Bumgarner said. ''I kept focusing on the next guy, but I had a hard time getting out of it.''
Devin Mesoraco led off with a double, Brayan Pena grounded out to Bumgarner, holding Mesoraco at second. Chris Heisey singled and Zack Cozart singled to score a run. Cueto followed with a bunt. Catcher Buster Posey fielded it cleanly, but he threw late to third, loading the bases and opening the floodgates.
Hamilton, who had three hits, drove in two with a single, Todd Frazier, who had three hits, singled home a run and after Phillips hit into a fielder's choice, Bruce singled in another run.
Bruce added an RBI single in the seventh against Yusmeiro Petit.
NOTES: Frazier extended his hitting streak against the Giants to 14 games. ... The Reds scored first for the 14th time in their last 16 games. ... The Reds released OF Roger Bernadina, who refused an assignment to Triple-A Louisville after being designated for assignment. ... RHP Alfredo Simon (10-3, 2.92) starts for the Reds on Saturday night. He's 7-1 in nine starts on the road. ... RHP Matt Cain (1-6, 4.82) is scheduled to start for the Giants on Saturday night. He's 2-3 in five outings against the Reds at home. ... Bumgarner became the first Giants' pitcher to record two pickoffs in the same inning since Bud Black did it in May of 1992. ... Giants 1B Brandon Belt was hit by a pitch and hit a home run in his second rehab game in San Jose.