Duda and David Wright had two hits and two RBIs each to help the Mets win their fourth straight.
Hunter Pence homered for the Phillies, who have lost four of five.
The Mets took the lead in the seventh with four two-out runs on four hits and a pivotal miscue by the Phillies, including Duda's single to right off Antonio Bastardo (1-2) that drove in Wright with the go-ahead run.
Kirk Nieuwenhuis' RBI single to right scored Jordany Valdespin and pulled New York to 4-2. Chad Qualls replaced starter Joe Blanton and gave up a single to right by Wright that drove in Andres Torres. Pence's throw home wasn't cut off by first baseman John Mayberry Jr. and Wright got caught in a rundown between first and second base.
However, after Rollins threw to first while second base was uncovered, second baseman Pete Orr tried to get Nieuwenhuis off the bag at third, but his throw bounced past third baseman Placido Polanco, allowing Nieuwenhuis to score and Wright to reach third.
Duda followed with his tiebreaking hit.
The Mets added two runs in the ninth on Nieuwenhuis's sacrifice fly and Duda's infield single.
Manny Acosta (1-2) didn't allow a run or hit in two-thirds of an inning in the sixth in relief of starter Miguel Batista.
Jon Rauch got the last three outs in his first save opportunity of the season.
The strange turn of events in the seventh inning spoiled a decent outing by Blanton, who entered the seventh having allowed one run on three hits. He was charged with four runs and five hits in 6 2-3 innings, striking out seven and walking three.
Batista, making his second start of the season for the Mets, gave up four runs - two earned - and eight hits in 5 1-3 innings. Batista was taking the spot in the rotation vacated by Mike Pelfrey, who had season-ending Tommy John surgery last week.
Pence gave the Phillies a 2-0 lead in the first with a two-run homer, a 414-foot drive to left-center.
Philadelphia, helped by two Mets errors, scored twice more in the second. Mayberry led off and reached second on a throwing error by shortstop Valdespin. Orr singled home Mayberry and Shane Victorino doubled to left-center to score Orr.
The Mets got on the board in the fourth. Nieuwenhuis started the inning with New York's first hit off Blanton, a double to right-center, and scored on Daniel Murphy's one-out single to left.
The Phillies got a runner to third with one out in the eighth on Placido Polanco's single and two wild pitches by Ramon Ramirez, but Ramirez struck out Orr. Tim Byrdak replaced Ramirez and got pinch-hitter Ty Wigginton to fly out to center.
NOTES: The Mets placed C Josh Thole on the seven-day DL with a concussion, and called up catcher Rob Johnson from Triple-A Buffalo. ... Philadelphia LHP Cliff Lee (0-1, 1.96), out for the last three weeks with a strained oblique, is scheduled to start Wednesday night's game against New York righty Dillon Gee (2-2, 4.50). . The Phillies' crowd of 43,821 was the club's 216th straight regular-season sellout and 232nd counting postseason play.