SAN DIEGO -- The Cincinnati Reds had to make so many plays late in game to stay in it, that manager Dusty Baker was left shaking his head.
"There were so many plays out there," said Baker. "And they all counted. Oh boy."
The Padres nearly won in the ninth when Cameron Maybin hit a drive with two outs and the bases loaded. Maybin put up his hands to celebrate, but Bruce ran down his drive into the right-center field gap.
San Diego also had the bases loaded with one out in the 10th but failed to score when Logan Ondrusek (2-0) struck out Chase Headley. Gomes then had to go back on Ryan Ludwick's fly ball after initially breaking in to snare it and end the inning.
"We didn't get the hit when we needed to and they did," San Diego manager Bud Black said. "In a close game, everyone wants to be the guy."
Hanigan's double into the left-field corner off Cory Luebke (0-1) scored Gomes, who was running on the 3-2 pitch from first base. After pinch-hitter Chris Heisey and Edgar Renteria had RBI singles, Stubbs homered.
"That's a huge win, those one-run games," Hanigan said. "I feel like the bullpen really stepped up and really stepped up and made quality pitches, we played great defense."
Ondrusek worked out of both of the bases-loaded jams in the ninth and 10th innings. Ondrusek, who was 5-0 last season as a rookie, became the first Reds pitcher to start his career 7-0 since 1986-87.
"I was having a tough time at the plate up until then," Hanigan said of his 11th inning at-bat. "I was just trying to battle and I got a pitch I could handle."
The victory moved Baker into a tie for 22nd place on the all-time wins list at 1,413 with Hall of Famer Miller Huggins.
San Diego trailed 2-1 when Nick Hundley led off with a single against reliever Nick Masset for only the Padres' second hit. Maybin followed with a double and pinch-hitter Eric Patterson's groundout tied it.
The Padres' rally ruined a stellar outing by Reds rookie pitcher Sam LeCure, who allowed one hit in seven innings and left with a 2-1 lead.
LeCure retired the final 12 batters he faced after allowing Alberto Gonzalez's RBI triple in the second inning. The right-hander struck out eight and walked two.
Gomes drove in one run for Cincinnati with a first-inning double and Stubbs had the other RBI on a groundout.
Gomes, who had homered in his previous two games, has seven RBIs in four games.
Cincinnati reliever Aroldis Chapman made his first appearance at Petco Park since last Sept. 24. In that outing, he threw 25 pitches and all of them registered at least 100 mph, topping out at 105 mph.
Chapman pitched a perfect seventh this time and his fastest pitch was 98 mph.
San Diego's Clayton Richard made his first start since he pitched just one inning Friday night against the Los Angeles Dodgers before a rain delay of 1 hour, 34 minutes forced him from the game. The lefty pitched well, but his throwing error contributed to Cincinnati's second run.
Richard allowed two runs on five hits over 7 2/3 innings with three strikeouts and two walks.
Gomes put the Reds ahead 1-0 with a two-out RBI double in the first inning after consecutive singles by Tony Phillips and Joey Votto.
San Diego tied the score in the second when Gonzalez doubled in Hundley, who walked. When the relay throw to third base got away, Gonzalez stumbled around third and was thrown out at the plate by Scott Rolen from foul territory down the third-base line.
San Diego SS Jason Bartlett missed his third straight game with a tight back. ... Cincinnati RHPs Homer Bailey and Johnny Cueto were both due to arrive in town during the game after flying in from Arizona. Bailey (right shoulder impingement) threw three innings Tuesday in Goodyear at the club's player development complex. Bailey is scheduled for a rehab start Sunday with Triple-A Louisville. Cueto (right biceps/triceps irritation) threw two innings on Monday and is set to pitch Saturday for Louisville.