In front of what few fans braved a massive winter storm, the Flyers lost for the 13th time in 16 games, despite outshooting New York 37-24.
Chris Drury gave the Rangers a lead at 5:16 in the first period. He intercepted Claude Giroux's clearing attempt in the slot and blasted a slap shop past Brian Boucher.
Chris Pronger's power-play goal tied it at 1 with 12:44 left in the first. Gagne, playing in his first game since Oct. 25 after hernia and abdominal surgery, fed Pronger, who fired a wrist shot from just inside the blue line past Lundqvist.
Pronger, the Flyers' biggest offseason acquisition, scored for the first time since Nov. 14 against Buffalo.
Anisimov's goal came early in the second. He took the puck behind the net and threw a backhand shot that bounced and skipped past Boucher, who stopped 22 shots.