The rare loss after taking a lead into the eighth was only the Pirates' fifth in their last 26 home games.
The 10 runs allowed were the most in 51 home games. Seven of those runs came against two cogs of one of the National League's deepest and most impenetrable bullpens.
"It's a night you don't want to have as a reliever. You got the lead there, so obviously that wasn't the plan," said Jason Grilli, who inherited a one-run lead with a 1.77 ERA and departed with a 2.66 ERA after allowing four runs without getting an out. "It doesn't feel good. It left a bad taste in my mouth."
After being strong-armed for six innings by Arizona rookie lefty Patrick Corbin, the Bucs jumped onto his relief for two runs in the seventh, starting with Starling Marte's tape-measure homer, which tied it at 3.
Marte's homer to dead center off righty Takashi Saito soared over the batters' background, disappearing 434 feet into the darkness beyond. That was followed by Travis Snider's single, Andrew McCutchen's double and an intentional walk of pinch-hitter Garrett Jones to load the bases with none out.
But given that setup, the Bucs got the minimum out of it, on Neil Walker's sacrifice fly off lefty Mike Zagurski.
It didn't take long for them to regret that missed opportunity: Keeping up with the tit-for-tat theme of the evening, the D-backs hit right back -- and harder -- off Grilli in the eighth. Goldschmidt detonated the inning by dropping an opposite-field double into the right-field corner and stopped at third on Justin Upton's single before Miguel Montero singled to make it 4-4, then Johnson unloaded for his 12th homer with two teammates on to make it 7-4.
"Goldschmidt took a late swing, got a ball to fall on the line," Grilli said. "That set me up for having to try to get a strikeout or double play, that's what I was leaning toward, then I let Montero hit an 0-and 2 pitch through. That just ruined what I was trying to salvage. Just one of those nights you like to forget about."
Arizona added three in the ninth off Jared Hughes, inflating his ERA, from 2.05 to 2.52.
"You never like it to happen," manager Clint Hurdle said of the bullpen meltdown, "but we haven't seen it before this season. That's a good lineup over there; the last six outs were very difficult to get."
Until finishing with two perfect innings, starter Jeff Karstens had to make 84 pitches through the first four. His six-inning turn still qualified as quality, on a yield of three runs and eight hits, as he struck out four without issuing a walk.
"I just couldn't make the pitches when I needed them, but it could have been a lot worse," said Karstens.
Corbin, who resembles a left-handed Orel Hershiser, had a lot of Bulldog in him, too. The Bucs consistently threatened, but whenever they had men on base, they seemed to be in more trouble than Corbin. Corbin held them to 1-for-7 with men in scoring position while allowing six hits in his six innings, with three walks and seven strikeouts.
"They came out swinging, so I gave up a couple of first-pitch hits," Corbin said. "I kind of settled in after that and mixed it up and got them off balance. [I] felt like I made some good pitches that they got hits on later, but I was able to work out of the jam."
Karstens fell behind, 1-0, in the first when Goldschmidt lined a two-out single off Karstens' rump to score Stephen Drew from third.
That was the sixth time in 10 starts that Karstens allowed first-inning scoring, and this one hurt in another manner, too: It snapped his scoreless streak at PNC Park at 20 2/3 innings -- 3 2/3 short of Shawn Chacon's 2007 house record.
The Pirates neutralized that score pronto. Marte and Snider began the bottom of the first with singles to put runners at the corners with none out and set up the longest run-scoring fielder's choice of McCutchen's career. His fly to center was dropped by Gerardo Parra, who recovered to throw out Snider at second as Marte scored.
According to a rule that specifically covers such a circumstance, the official scorer still credited McCutchen with an RBI and a sacrifice fly -- meaning no at-bat against his average.
McCutchen thus went 2-for-3 to raise his MLB-best average to .372, though Snider one-upped him with his 3-for-5 showing.
The third inning gassed Karstens. He needed 29 pitches to get through it and, when it was over, Arizona still only had the one run, provided by Drew's leadoff homer. Jason Kubel singled with one out, and new Pirates-killer Goldschmidt followed with a double. However, a key strikeout of Upton and Montero's fly to left prevented further scoring.
Again, the Bucs promptly answered Corbin in the bottom of the inning with some two-out lightning on Snider's double and McCutchen's run-scoring single.
Then it was again Arizona's turn: Drew delivered an RBI single right through Karstens' legs with two outs in the fourth to give Arizona a one-run lead.