Henrik Borgstrom, Denis Malgin and Keith Yandle scored for the Panthers (15-15-6), who had won four of their previous five. Roberto Luongo made 23 saves.
"It was not the prettiest game from both teams," Florida forward Mike Hoffman said. "It was a game of mistakes and we made a little bit more than they did."
Tatar made it 3-2 with a power-play goal five seconds after the end of a 5-on-3 when he one-timed Jonathan Drouin's pass in the right face-off dot.
Artturi Lehkonen made it 4-2 at 15:40 with a high wrist shot from close range.
Yandle scored on the power play with 1:16 left to make it 4-3, and Jonathan Huberdeau hit the post before Drouin scored into an empty net with 23 seconds remaining for the 5-3 final.
"They came out hard in the third," Huberdeau said. "We had some chances at the end, but I guess there was no need to be down two goals. We've got to be better defensively. We let in four goals. We could have tied it at the end. Hit the post, but that's part of it."
Montreal took a 2-0 lead in 2:51, but Florida tied the game before the end of the first period.
Tatar made it 1-0 at 35 seconds with a backhand after a turnover behind the Florida net. Nicolas Deslauriers made it 2-0 at 2:51 when Victor Mete's wrist shot from the point went off him after being deflected by Florida forward Jayce Hawryluk.
"I think it was important for us to have a good start," Canadiens coach Claude Julien said. "There was a big importance on both sides to this game, and we needed to have a good start, especially on the road."
Borgstrom made it 2-1 at 8:01 with a wrist shot to the stick side from the slot, and Malgin tied it 2-2 at 13:53.
"It was still the first period, it wasn't the end of the world," Drouin said. "Of course, it was disappointing after a good start like that, but we played well. We didn't change the way we were playing and we got the win."