After spotting the Phillies a 3-0 lead, the Mets stormed back with five runs in the third, aided by Hunter Pence's error in right field that allowed a pair of runs to score.
Dillon Gee (13-6) went six innings to get the victory, allowing three runs (two earned) on nine hits while issuing a pair of walks and striking out two.
Bobby Parnell and Daniel Herrera teamed up for two scoreless relief innings and Manny Acosta saved both ends of the twinbill for the Mets.
The National League East champion Phillies, meanwhile, lost their eighth straight game en route to the post-season.
David Herndon (1-4) absorbed the loss after starter Joe Blanton pitched two shutout frames.