Tovar knocked in two runs with a single in the seventh to put the Mets ahead by one with his first major-league hit. LaTroy Hawkins earned his 100th career save and 12th on the season by striking out Jimmy Rollins to end it.
Carlos Torres (4-5) struck out six in six innings for New York and allowed two runs on seven hits and three walks.
Cliff Lee (14-7)gave up three runs, two earned, and eight hits in seven innings. He struck out eight without a walk in Philadelphia's final home game of the season.
Domonic Brown put the Phillies ahead in the sixth with a one-out RBI single that made it 2-1.
After Kevin Frandsen hit an RBI double in the second inning, the Mets' Andrew Brown answered with an RBI groundout in the fourth.
Cody Asche struck out with the tying run on third in the eighth. Philadelphia pulled within one when Carlos Ruiz tagged and scored from third on a foul-ball pop up by Darin Ruf.
The Phillies fell to 18-17 under manager Ryne Sandberg, whose interim tag was removed by the team before the game.