Sam Montembeault made the save on all 15 shots he faced after relieving Sergei Bobrovsky to start the third period and stopped three of four shooters in the shootout for the Panthers (9-4-5), who have won their past two games.
Keith Yandle had a goal and two assists, Jonathan Huberdeau had three assists, and Vincent Trocheck and Mike Hoffman scored in the shootout for Florida, which scored four goals in the third.
"Well that was the improbable one, didn't expect to do that one," Panthers coach Joel Quenneville said. "We were fine, it was 0-0 (after the first period), and then we lost our composure and we gave up four quick ones (in the second period), so we weren't happy with the way basically the whole second period went.
"Scoring early in the first shift of the third gave us obviously a little bit of a lift there, and we got a little excitement off of it and the power play came up with a couple big ones and you know, finding a way to win it."
WATCH: [All Panthers vs. Bruins highlights]
Tuukka Rask made 25 saves for Boston (11-3-4), which is winless in its past four games (0-2-2) but extended its home point streak to 10 games (7-0-3). The Bruins are the only NHL team without a regulation loss.
"I should've been sharper in that third period, a couple soft goals and I let the [other] team get some momentum," Rask said. "But it's a 60-minute game, we've been on the other side, you know, kind of you never give up, and that's how teams build character. So good for them, I guess. But yeah, it's a 60-minute game, and I'm sure a lot of it's mental. But I definitely take most of the blame on that third period."
Aaron Ekblad started the rally with a goal 50 seconds into third period to cut the Bruins lead to 4-1.