With two on and one out in the 10th, Dodgers reliever Josh Wall intentionally walked Lucas Duda to set the stage for Valdespin, who connected for New York's first walk-off grand slam since Kevin McReynolds hit one on June 25, 1991.
"He just relishes that big moment during a game," manager Terry Collins said of Valdespin.
The game-ending slam was also a bit of redemption for Valdespin, who'd entered the game in the eighth inning as a pinch-hitter with two outs and the potential tying run on third base. But he grounded out weakly to first base before coming through two innings later.
"The first time [Collins] gave me a chance, I hit a ground ball and I said, 'I want to hit again. I want to hit again because I want to win the game,'" Valdespin said. "And then I got up again and hit the big one."
Valdespin's second chance was only possible because of stellar work by the bullpen and a crucial rally one inning earlier. With the Mets trailing by one, pinch-hitter Mike Baxter led off the ninth inning with a double against Dodgers closer Brandon League. He then moved to third on Ruben Tejada's sacrifice bunt and scored on a two-out single by David Wright.
Closer Bobby Parnell then pitched a scoreless 10th to notch his first win of the season, capping four innings of hitless work by the bullpen. LaTroy Hawkins pitched a perfect seventh, Scott Rice followed with 1 1/3 perfect innings of his own, and Scott Atchison recorded the final two outs in the ninth before handing the ball to Parnell.
The collective effort of the bullpen, as well as the crucial hits from Wright and Valdespin, saved the Mets from taking their first loss with Harvey on the mound this season. The young right-hander was lifted for a pinch-hitter with the Mets trailing, 3-1, in the bottom of the sixth inning, but he remained undefeated thanks to the late rally.
"It was nice to be able to pick him up, especially for what he's done for us so far," Wright said. "But these close games, it comes down to bullpen and situational hitting, and we got both of those late in the game."
Though Harvey needed the rally to avoid his first loss, he still turned in his fifth quality start in as many outings. The 23-year-old allowed as many runs (three) over six innings of work as he had in his first four starts combined, yet he still sports a 1.54 ERA.
He stumbled out of the gates, though, allowing a first-inning run to put the Mets in an early hole, but he settled into his dominant early-season form until running into more trouble in the sixth. After the Mets had tied the score one inning earlier -- on Harvey's first career run, no less -- Harvey served up Matt Kemp's first home run of the season, a two-run shot that was initially ruled a triple before replay overturned the call.
"Tonight's about winning, and we did that," Harvey said. "The bullpen came in and did a great job, and obviously, the timely hitting we had, that's the real story tonight. I've got work to do. I've got to move on from this start and get ready for my next start."
Although the outing clearly fell short of Harvey's first four, in which he went at least seven innings and never allowed more than one run, Dodgers manager Don Mattingly was still impressed with the performance.
"Obviously, he looked good," Mattingly said. "He's a power guy, only he's not all over the place. He's ahead in the count a lot to keep his pitch count down and keep himself in the game. A good change and breaking ball."
The win pushes the Mets' record to 10-9 and prevents them from falling below .500 for the first time this season. It also puts them in a position to play for its second straight series victory in Thursday afternoon's finale.
Yet Collins is hoping that the dramatic manner in which his team rallied on Wednesday will have a longer-lasting impact.
"It's a huge lift. That's a very, very good team," Collins said. "And when you've got your ace on the mound and he leaves the game and you're getting beat, you don't know what's going to happen. So to come back and win a game like that, especially against their closer to get the game tied, then win it later in the game, that's going to be huge for us as we move forward."
Paul Casella is a reporter for MLB.com. Follow him on Twitter @paul_casella. This story was not subject to the approval of Major League Baseball or its clubs.