"It felt great to be able to contribute and get a hit at a big time," said Kubel. "I had a big chance earlier and missed that one, so it was nice to be able to do that."
It was nice for the D-backs to get back on the winning side of things after blowing ninth-inning leads in losses Sunday and Monday.
That this game went extra innings seemed unlikely when the D-backs built a 6-2 lead through the first five innings.
"It was a great game," D-backs manager Kirk Gibson said. "We had a lead, and just as the Giants have done all year, they kept coming back."
Indeed, D-backs right-hander Ian Kennedy was unable to make the lead hold up as the Giants rallied for three runs in the sixth -- two of which came on Brandon Belt's shot into McCovey Cove -- and one in the seventh to tie the game at 6.
"It was a hard-fought game," Giants manager Bruce Bochy said. "The guys fought hard after we got down, and we came back."
The Giants had a chance to take the lead when they put the first two batters on in the eighth, but reliever Mike Zagurski came on to strike out pinch-hitter Joaquin Arias before getting Hector Sanchez to ground into a inning-ending double play.
"We couldn't quite finish the deal in the eighth with the golden chance there where we couldn't get a run in," Bochy said. "But you have to like the way we fought back. We just couldn't quite finish it. We had tough hitters up there, and the guy pitched well and he got out of it."
Finally in the 11th, the D-backs managed to break through.
Hill led off the frame with a single. It was the second baseman's career-high fifth hit of the night and he came within a triple of becoming the first Major Leaguer to hit for the cycle three times in one season.
Hill doubled in his first at-bat of the game, singled in the third and homered in the fourth.
Hill had three chances to make history, but settled for an infield single in the sixth and an intentional walk in the eighth before the 11th-inning single.
"We were thinking about it," Gibson said of Hill's cycle. "He had it early, too. Five hits, he's been outstanding for us all year."
After Justin Upton flied out to right, Kubel smacked a 2-2 fastball over Hunter Pence's head in right to score Hill.
After Paul Goldschmidt was intentionally walked, Miguel Montero blooped a single to center to score Kubel and give the D-backs an extra run.
It was left to Josh Collmenter, who came on in the 10th, to finish out the game. Given the way the last two games ended for the D-backs, it was no surprise that things would get interesting at the end.
Xavier Nady and Emmanuel Burriss started off the 11th with singles, but Collmenter settled down to retire Angel Pagan, Marco Scutaro and Pablo Sandoval in order to close things out.
"It was just typical Colly," Gibson said. "He's got great composure."
Collmenter (4-3) picked up the win while George Kontos (1-1) took the loss.
The Giants matched a Major League record by using 11 pitchers. It was just the fifth time that's happened.