SAN FRANCISCO -- Giants manager Bruce Bochy watched two of his players collide and miss a catchable ball in foul territory, leading to a first-inning run for San Diego. He feared the worst: yet another injury.
"I really consider ourselves fortunate nobody got hurt," Bochy said of the early play. "It's amazing: What can go wrong is going wrong right now. We didn't catch that ball and they scored a run."
Nick Hundley doubled against Ramon Ramirez (2-2) to start the ninth, then Logan Forsythe sacrificed him to third before Gonzalez singled up the middle. After a wild pitch, Will Venable added a run-scoring single.
The reigning World Series champion Giants fell two games behind the first-place Diamondbacks in the NL West after Arizona won at Washington.
Mat Latos didn't allow a hit until the fifth inning, but the Padres' bullpen couldn't hold a three-run lead.
But pinch-hitter Carlos Beltran popped out to end the eighth a few hours after he was activated from the disabled list. He received a roaring ovation from the sellout crowd of 41,288 when he stepped into the batter's box.
"We gave up the three in the (eighth), but in the dugout there was still positive energy," Padres manager Bud Black said. "That was a huge momentum shift to the Giants and we got it back."
Blanks' second-inning drive was the first home run allowed by Matt Cain in 13 starts since June 14 at Arizona.
The Giants, back in their ballpark by the bay for a season-long 12-game homestand, also hurt their cause with three errors. San Diego overcame two blunders of its own.
Chris Stewart broke up Latos' no-hit bid with a bloop single to center leading off the fifth.
Latos allowed only Cody Ross' two-out walk in the second before running into trouble in the fourth. The right-hander retired the first two batters, then walked the bases loaded for Aaron Rowand, but he grounded out. Ross hit an RBI double in the eighth.
After Maybin's third-inning RBI single, Cain retired the next 10 batters in order before giving up a leadoff single to Orlando Hudson in the seventh.
Hudson fouled a ball off his right foot in the eighth and fell to the ground, writhing in pain. He walked it off and drew a walk on the next pitch from Steve Edlefsen.
The Giants scored two in the sixth, getting a break on Guzman's gaffe at first base. Guzman fielded Brandon Belt's sharp grounder, held onto the ball trying to freeze the runner and then opted to throw home rather than make the routine out at first. His throw was wild and well up the third-base line for a two-run error.
Cain was charged with an error when he apparently missed the bag while covering first on Hudson's grounder leading off the second. Blanks then homered on an 0-2 pitch.
The three errors matched San Francisco's season high and gave the Giants 92 on the season.
Things aren't going well for the defending champs.
"That's where we have to find out what kind of group of guys we have," Cain said. "We have to go out there and think positive and keep moving forward and not think about all the bad things and injuries we have going on."
San Francisco placed five players on the disabled list during its recent 4-6 road trip and six others missed time with injuries.
The Giants added to that list Tuesday but also got some good news with Beltran's return from a strained right hand and wrist. The switch-hitter hopes to start Wednesday night.
San Francisco put left-handed starter Jonathan Sanchez on the 15-day DL with a sprained left ankle. Outfielder Nate Schierholtz was in a walking boot for a hairline fracture in his right foot. Schierholtz is going to try to play through it after a couple of days of rest.
In the first, Huff tried to chase down Guzman's ball in foul territory and right fielder Ross charged in, slid low and took Huff down. Huff was slow getting up but stayed in the game.
Blanks has hit safely in 14 of his last 18 games since Aug. 5 -- getting six homers and 18 RBIs in that span. ... Cain committed his third error of the season, matching the most of his career, also done in 2006. ... Maybin, San Diego's CF who wears No. 24 like Hall of Famer Willie Mays, got to meet the Say Hey Kid at his Bay Area home Tuesday. ... The Giants committed only 73 errors in 2010. ... RHP Tim Lincecum (11-10) pitches Wednesday night for the Giants looking for his third win in four starts this season vs. San Diego. He is 7-4 with a 2.16 ERA lifetime in 16 career starts against the Padres. ... Tim Stauffer (8-9) takes the mound for San Diego looking to improve on his 3-5 road record.