Henrik Lundqvist made 29 saves, and Chris Kreider and Boo Nieves scored for the Rangers (15-14-6), who have lost two in a row and 10 of their past 13 games (3-6-4). They are on a six-game point streak at home (2-0-4).
"I looked this morning at the standings and obviously the separation is getting bigger," Lundqvist said of the Rangers, who are fifth in the Metropolitan Division, six points behind the third-place Pittsburgh Penguins. "We've got to start winning here if we want to be part of that race. Take this [Christmas] break and regroup and realize how desperate we need to be coming back."
Patrick said the Flyers are going into the break feeling better about themselves because of how they've played in four games since Gordon replaced Dave Hakstol. They felt they could have had eight out of eight points because of how they played in a 4-3 loss to the Columbus Blue Jackets on Saturday, when they outshot Columbus 37-19.
Philadelphia also has scored a power-play goal in back-to-back games after going 1-for-31 in their previous 13 games.
"A lot of guys got their confidence back," Patrick said. "We're rolling right now, so it feels good."
The Flyers also responded after giving up the first goal Sunday, winning for the seventh time in 23 games the opponent has scored first (7-14-2).
Kreider scored on a breakaway to give New York a 1-0 lead at 10:05 of the first period.
The Flyers tied it 1-1 on Raffl's first goal of the season at 1:46 of the second period. He got behind Rangers defenseman Marc Staal, starting a 2-on-1 with Scott Laughton. Raffl kept the puck and scored with a glove-side wrist shot from the right face-off circle.
Raffl had no goals on 19 shots in 20 games entering Sunday.
"I actually had a good talk with [Laughton] yesterday, and he told me, 'Shoot the puck, man,'" Raffl said. "I took it to heart and finally got one in."
Simmonds gave the Flyers a 2-1 lead with a power-play goal from the top of the crease at 5:01.
Nieves scored his first goal of the season 22 seconds later to tie it 2-2 at 5:23. He beat Neuvirth with a one-timer from the slot off a pass out of the corner from Lias Andersson, who forced a turnover before feeding Nieves.
Neuvirth made eight saves after Nieves' goal, including a point-blank stop on Brett Howden from the slot with 3:53 remaining and on Pavel Buchnevich from the bottom of the left circle with 1:10 left. He made two saves in overtime and stopped Mats Zuccarello, Mika Zibanejad and Buchnevich in the shootout before Patrick scored and Hayes missed.
"It means a lot for me, personally," Neuvirth said. "It's one of my biggest wins of my career. It feels really nice right now."