The loss dropped the Pirates 3 1/2 games back in the National League Central behind the Reds, who beat the Cubs, 10-8, earlier on Friday.
After the Pirates regained the lead on a run-scoring single by Rod Barajas in the sixth inning, the Padres snatched it back in the seventh with a two-run homer by Chase Headley, who went deep from both sides of the plate on Friday. He now has 17 home runs this season.
"It was a great game for Headley," Padres manager Bud Black said. "Obviously, the big blow tied the game, and the right-handed homer gave us the lead. You can't hit two bigger home runs and also [get] five RBIs when we needed [them] the most."
Headley's left-handed shot came in the fifth, which is when McDonald's gem lost its shine. With one out, McDonald issued a walk to Cameron Maybin and allowed a single to John Baker. Then Jesus Guzman, pinch-hitting for reliever Alex Hinshaw, cleared the bases with a double. That was followed by singles from Amarista and Everth Cabrera, both of whom scored on Headley's game-tying three-run homer.
After the game, manager Clint Hurdle was asked about the decision not to pull McDonald earlier.
"There's a risk and reward in those decisions, and those fall on the manager's shoulders," Hurdle said. "The move I made did not work. So that falls on me. But obviously, we thought he could get through it, or we wouldn't have left him in."
McDonald went 4 1/3 innings, allowing seven runs -- all earned -- while striking out four and walking one. With the loss, his ERA climbed from 3.42 to 3.77. In six starts since the All-Star break, he is 1-2 with an 8.71 ERA.
"This is something that a lot of players don't want to go through, but they have to sometimes," McDonald said. "I let the team down today, big time."
Lefty Tony Watson, who gave up Headley's second homer, picked up the loss and a blown save. San Diego reliever Brad Brach was credited with the win.
Before San Diego came storming back in the fifth frame, Pittsburgh had built up a hefty lead over each of the previous three.
The home team put together an impressive fourth inning, which included a three-run homer by Travis Snider and a two-run single by Pedro Alvarez. The big fly was Snider's first in a Pirates uniform and the team's 800th at PNC Park. Alvarez's single broke an 0-for-11 slump, during which the third baseman had struck out five times.
"I've hit home runs before in the big leagues," Snider said. "At the end of the day, what we're looking for is wins."
An inning earlier, Garrett Jones took Padres starter Edinson Volquez deep to right field for his 17th home run of the season. The dinger was Jones' third off Volquez in 10 at-bats.
Volquez went 3 1/3 innings, surrendering six runs on seven hits. He walked four and struck out three.
The Pirates' first run came in the second inning, when Starling Marte's single through the left side scored Clint Barmes and answered Amarista's leadoff homer.
"We were on the opposite end tonight, but we've got to keep picking each other up and get ready for tomorrow, put this one behind us," Snider said.
Before Friday, the largest lead the Pirates had blown this season was three runs, and the Padres had yet to come from behind when trailing by more than four. San Diego has won five straight, whereas Pittsburgh is in a two-game skid. The Padres are undefeated in their last 10 games at PNC Park.
"There's going to be disappointment in sport, especially in the game of baseball, [where] you play 162 games," Hurdle said. "Things happen from time to time. This is disappointing. It's a disappointing evening at the ballpark. Great crowd. Great energy. You get a big lead, and you're not able to finish it off.
"There's not many seasons that happen where you don't have a game like this, or two. And if you don't have a good team, you have more than that. But you find a way to claw back, because that speaks to the character of your club, it speaks to the mental toughness of your club, and that's what we'll do."