Dana Eveland (1-1) earned the victory by working a scoreless inning in relief for the Mets, who won for the fifth straight time at Citizens Bank Park and for the 11th time in their last 12 games in Philadelphia. The Mets have won nine of their last 11 against the Phillies.
New York is also 4-2 against Philadelphia in extra-inning games this season.
Duda, the Mets' first baseman, then lined Bastardo's first pitch into right field, bringing Granderson home.
The Mets managed one hit until the fifth inning when Duda led off with a broken-bat single to center field, catcher Travis d'Arnaud walked and center fielder Juan Lagares blooped a single to left, loading the bases.
Philadelphia third baseman Cody Asche then dived to his left to snag a grounder by shortstop Wilmer Flores and was able to throw to second for the forceout as the game's first run scored.
The Phillies tied it at 1-1 on a solo homer by catcher Carlos Ruiz in the seventh. The homer was Ruiz's third of the season and his first in his last 29 games. It came against Mets starter Dillon Gee.
Gee and Philadelphia starter Cole Hamels each yielded one run in seven innings, and neither figured in the decision. Hamels allowed five hits while striking out five and walking three, and Gee allowed three hits while striking out four and walking three.
The run was the only earned run Hamels has allowed over his last two starts. He has a loss and a no-decision to show for it.
Notes: Former Phillies manager Charlie Manuel was added to the club's Wall of Fame in a pregame ceremony. "I never go looking for awards, but if they want to give me something, I'll take it," Manuel told the crowd. … Philadelphia manager Ryne Sandberg said RHP Sean O'Sullivan will start Tuesday at the Los Angeles Angels. He was recalled from Triple-A Lehigh Valley after Roberto Hernandez was traded to the Dodgers on Thursday. … Mets OF Matt den Dekker, promoted Friday after OF Chris Young was designated for assignment, was hitting .334 at Triple-A Las Vegas, best in the Pacific Coast League. He was third with 31 doubles, tied for third with seven triples and sixth with 70 runs. … Phillies LF Domonic Brown started for the first time in 11 games. He had been held out in part because of infected tonsils and also because of the strong play of Grady Sizemore.