San Francisco trailed, 4-0, after three innings and appeared destined for a one-sided defeat. But after Brandon Crawford's eighth-inning triple sparked a two-run uprising, Brandon Belt launched a pinch-hit, two-run homer in the ninth off Arizona closer J.J. Putz to force extra innings.
This was the same Belt who delivered Monday night's game-winning single in the ninth inning.
"I feel like I've seen the ball well in the past couple of days. That's helped me stay calm in those situations," said Belt, who stayed in the game at first base and added an 11th-inning single.
But the Giants lapsed defensively, committing a season-high three errors that generated a pair of unearned runs. Crawford's game-opening misplay of Gerardo Parra's grounder helped Arizona score twice in the first inning. That was bookended by Belt's 11th-inning error that precipitated the D-backs' winning rally.
With the score tied at 4, Arizona inched ahead against Giants right-hander Santiago Casilla. Didi Gregorius doubled with one out on a softly hit ball that left fielder Andres Torres approached tentatively.
"He was probably a little too conservative," Giants manager Bruce Bochy said.
Gregorius advanced as third baseman Pablo Sandoval fielded pinch-hitter Alfredo Marte's ground ball and made a one-hop throw that Belt couldn't hold. Casilla unleashed a wild pitch that scored Gregorius before Parra's double delivered Marte.
The usually sure-handed Belt blamed himself for dropping Sandoval's throw.
"It's one of those things that I might have taken for granted," he said. "It's definitely my fault. It stayed up on me and I didn't watch it into the glove."
The Giants had a chance to win it in the 10th, but Sandoval was thrown out at home plate trying to score from second base on Hunter Pence's two-out single.
Bochy defended third-base coach Tim Flannery's decision to send Sandoval and test right fielder Cody Ross' arm.
"You get a two-out hit, you're trying to score," Bochy said. "Ross charged it well, threw a bullet home and [Sandoval] was out. That's part of the game. They're going to have to make good plays. We got the hit we were looking for; they had to make a great throw."
Arizona catcher Miguel Montero sensed that he would receive a quality throw from any of the outfielders.
"I knew if we gave up a single right there, it would have been a play at the plate and a good chance to get him out," Montero said. "I know if they get a hit, it would have to be in the gap for him to score, because all three of those guys can throw the ball good."
Paul Goldschmidt contributed a two-run, third-inning homer and drove in three runs to help Arizona build its early lead against Giants right-hander Matt Cain, who's winless in five April starts. Goldschmidt owns a .309 career batting average against San Francisco with seven home runs and 23 RBIs. He's particularly effective at AT&T Park, where he's hitting .350 with five homers and 17 RBIs.
Cain lasted six innings, surrrendering four runs (three earned) and five hits while walking one and striking out six. After shaving his ERA from 7.15 to 6.59, he said he "felt better" but lamented his early-inning shortcomings.
"I'm putting the guys in a hole," he said.
D-backs left-hander Patrick Corbin, who retired the first nine batters he faced and 12 of 13, blanked San Francisco on three hits through seven innings. Then the Giants began their characteristic surge, collecting nine hits in the final four innings.
"This is what we've done the last couple of years," Cain said. "We might not come back, but we felt like we had a chance."