The Panthers won 2-1 in the shootout, clinching the victory when Vincent Trocheck scored in the second half of the third round. Aleksander Barkov also scored for Florida. Mats Zuccarello scored for New York.
Zuccarello, Mika Zibanejad and Kevin Hayes scored for the Rangers (30-32-7), who have lost three in a row. New York is 10 points behind Columbus and 11 points behind New Jersey. Henrik Lundqvist made 32 saves.
"We kept battling," Lundqvist said. "We kept coming back in this game and gave ourselves the chance to almost win it. If I can mix in a save in the shootout, maybe we get a win."
Florida led 2-1 before Zibanejad tied the game with a backhand 17 seconds into the third period. It was Zibanejad's 20th goal of the season.
McGinn made it 3-2 at 1:02 when he scored on a rebound. Hayes tied it 3-3 with his 20th goal at 7:25.
"I wasn't happy with my third period, I thought I should have had both goals," Luongo said. "It's nice that the boys stepped up and we were able to get a couple of big shootout goals and get the two points."
Huberdeau gave the Panthers a 1-0 lead with a power-play goal with 15 seconds remaining in the first period.
Vatrano made it 2-0 at 8:13 of the second period when he one-timed Trocheck's backhand pass between the legs from behind the net. Zuccarello made it 2-1 at 13:11.
Vatrano, acquired in a trade with the Boston Bruins on Feb. 22, ended a 13-game goal drought. He had been out with a high-ankle sprain but was activated off injured reserve on Friday.
"It's awesome," Vatrano said. "It's even better that it helped out getting a win. For me, it's kind of taking it shift by shift and getting used to the systems. I haven't played in about a month and it's probably the most minutes (19:05) I've played in two years. For me, it's trying to keep my legs underneath me every shift, making sure I was giving my all and trying to keep them short."