Philadelphia defenseman Shayne Gostisbehere, who was born in nearby Pembroke Pines, Florida, scored to make it 1-0 1:45 into the game on a wrist shot from the left face-off circle after taking a feed from Jordan Weal.
Hart made the lead stand up until Hoffman scored his Florida-leading 18th goal after taking a centering pass from Huberdeau in the slot.
"Carter played a great game," Flyers coach Scott Gordon said. "Even his reaction on the goals were right on. He should leave knowing that he was our best player and gave us a chance to win the game. If anything, it falls on the rest of us. There's no way he should think that the two goals were the reason that we lost the game."
Huberdeau scored the game-winning goal after a stretch pass by defenseman Keith Yandle to Evgenii Dadonov from behind the Florida net to the Philadelphia blue line. Dadonov skated deep into the Flyers zone before dropping the puck back to Barkov, who one-timed a pass to Huberdeau.
"It was a great play by [Dadonov] stretching the zone and getting open," Yandle said. "Those guys did their magic. It's what they do. They play big for us every night and find ways to win us games. They did that tonight."
The Flyers had a good scoring chance in the final seconds when Claude Giroux one-timed a shot from above the left circle, but Reimer got his right pad on it to send it into the netting.
Reimer said he enjoyed the goaltending duel.
"It's obviously a lot better when you come out on top," he said. "It's fun. That kid, he's got a bright future. He sees the puck well. We were just lucky enough to make a couple of good plays and be able to beat him."
The Panthers were coming off a 5-3 loss to the Montreal Canadiens on Friday but have won four of their past six games.
Coach Bob Boughner said he liked how Florida's four leading scorers -- Huberdeau, Barkov, Hoffman and Dadonov -- responded to the loss.
"They had an off game the other night -- they know that -- and we had a great meeting this morning," Boughner said. "Tonight was a true character test really. It was a response game. You find out a lot about your team and individuals in games like this. I'm pleasantly surprised. There have only been a few of these games this year where we've blown it up and sort of beat ourselves the night before. We came through with a great response today."