With the win, the Red Sox took over sole possession of first place in the AL East and clinched a win in the season series against New York for the first time since 2004.
But Marco Scutaro led off with a double for his fourth hit of the game. He moved up on a sacrifice and scored on a sacrifice fly to send the game into extra innings.
It was the fifth blown save of the season for Rivera, who pitched a scoreless inning in each of his first two appearances against Boston this season.
"That's huge. He's the best closer in the game right now," Reddick said.
Reddick then hit a liner into the corner in left, driving in McDonald as the Fenway Park crowd erupted in cheers.
Daniel Bard (2-5) pitched a scoreless 10th for the win.
Boston lost the series opener but won the next two to snap the Yankees' eight-game winning streak and take the series. The Red Sox are 10-2 against New York this season with six games left, and one game up in the AL East.
Gardner had three hits for the Yankees, including the tiebreaking drive with two out in the seventh. He also stole two bases, giving him 35 on the season.
Nunez tied it with his homer in the fifth — one batter after Russell Martin was thrown out by Reddick trying to stretch a single into a double.
Meanwhile, the Red Sox kept producing baserunners — and stranding them. They left the bases loaded in the second and sixth, and stranded a pair in the fourth.
NOTES: Mexican billionaire Carlos Slim was in the Red Sox clubhouse before the game, then posed for pictures with David Ortiz and Adrian Gonzalez. ... New Patriots wide receiver Chad Ochocinco was at the game, drawing a big cheer when he was shown on the scoreboard. ... Crawford hit safely in seven consecutive plate appearances — two on Friday, four on Saturday and his first at-bat on Sunday — before he grounded out in the fourth inning. ... Ellsbury made a nice run to catch Nick Swisher's line drive in the triangle to end the fourth inning. ... Yankees SS Derek Jeter made a play to his right into shallow left field to get Gonzalez's grounder and force Pedroia out at second. More good defense: 1B MarkTeixeira diving stop on Ellsbury and Kevin Youkilis diving behind third on Jeter, both in the first inning. ... Neither starter, Josh Beckett (6 IP, 1ER) and Freddy Garcia (5 IP, 1 ER), received a decision. ... The Yankees are off on Monday, and Hughes was supposed to pitch against the Angels on Tuesday. The Red Sox play three against Minnesota, with Tim Wakefield facing Scott Baker in the opener Monday night. Wakefield will be going for his third try at win No. 200. He would be the 108th pitcher in major league history to reach the milestone. ... Rivera made his 1,023rd appearance, moving him into 10th on the career list; he had been tied with Jose Mesa and Lee Smith.