Buster Posey homered among his three hits for the Giants, who have lost five straight and seven of their last eight.
The Giants (35-34) couldn’t hold a 3-1 lead for Barry Zito and dropped into fourth place in the NL West for the first time since April 8.
Zito threw seven shutout innings in a home win over the Padres on April 21, but was hindered by five unearned runs in an 8-7 loss in San Diego six days later.
Starling Marte had a career-high four hits and scored four times and the Pittsburgh Pirates beat the San Francisco Giants 12-8 on Wednesday night.
Pablo Sandoval hit a go-ahead two-run single in the sixth to help Barry Zito end a six-start winless stretch, and the San Francisco Giants beat the Oakland Athletics 5-2 on Thursday to avoid a season sweep.
Barry Zito, who has won just once in six starts, allowed eight runs, five earned, and a season-high 12 hits in 5 2-3 innings. The lefty, who walked two and struck out two, fell to 1-4 with a 5.40 ERA in six career starts at Rogers Centre.
Andres Torres lined a game-ending single to right field with two outs in the 10th inning, lifting the San Francisco Giants to a 4-3 victory against the Philadelphia Phillies on Wednesday to avoid a sweep.
Buster Posey hit a game-ending home run into the left-field seats leading off the bottom of the ninth, and the San Francisco Giants beat the Los Angeles Dodgers 2-1 on Friday night.
Barry Zito and Chad Gaudin combined on a six-hitter, Buster Posey homered and the San Francisco Giants beat the San Diego Padres 5-0 on Sunday to complete a three-game sweep.
Yuniesky Betancourt hit a grand slam, and Carlos Gomez and Norichika Aoki also homered as the Milwaukee Brewers used an eight-run third inning to beat Barry Zito and the San Francisco Giants 10-8 on Tuesday night.