Frank Vatrano and Anthony Duclair also scored, and Sam Bennett had two assists to help Florida jump one point ahead of Tampa Bay for second place in the Central Division. Sergei Bobrovsky stopped 28 shots.
Brayden Point, Erik Cernak and Mathieu Joseph scored for the Lightning. Victor Hedman had two assists to top 400 for his career. Andrei Vasilevskiy had 27 saves in his first loss on home ice this season in 15 starts.
The Panthers grabbed a 2-0 lead in the opening period on Montour's first goal with Florida at 8:41 and Barkov's rebound chance off his own shot on the power play that went in off Hornqvist at 12:31.
Point answered with his 18th of the season 1:09 later when Mikhail Sergachev's shot grazed off Point at the right post.
In the final minute of the period, Tyler Johnson turned the puck over to Bennett in the neutral zone and missed his check on Huberdeau who pounced on a rebound of Markus Nutivaara's shot with 7.8 seconds left for a 3-1 lead.
Vatrano converted a breakaway at 17:34 of the second for a three-goal lead, but Cernak answered with 45 seconds left in the period.
Joseph tipped a Hedman shot to make it 4-3 at the 1:53 of the third period, but Duclair's empty-netter with 50 seconds left sealed the win.
Two days after the Lightning placed captain Steven Stamkos on long-term injured reserve with an unspecified lower body injury, the team confirmed the current injury is unrelated to the core muscle surgery he underwent last season.
"We are extremely optimistic that after he comes off the required time amount he'll be in really good shape to continue playing for us,'' Lightning head coach Jon Cooper said. "We'll see how he rests and how is body mends a little bit and hopefully he'll be back on the ice in a week-to-10 days, get him back going again and make a push for the playoffs.''
LOOKING FOR FITS
Bennett made his Panthers debut, five days after being acquired from the Calgary Flames at the trade deadline. Bennett worked the middle on Florida's second line between Huberdeau and Duclair, as Panthers coach Joel Quenneville tinkers with his lineups with an eye on the start of next month's playoffs.
"We're looking for some balance,'' Quenneville said. "We've got a little more depth, we've got some more options with guys who can potentially play in the middle, so having versatility with wingers and centres and now we have some options in making our lines.''
Panthers: Host Columbus on Monday night.
Lightning: Host Carolina on Monday night.