Tim Thomas made 23 saves and was perfect in the shootout for Florida, which won on the road for the first time since Dec. 19.
Florida carried much of the play, outshooting Buffalo 35-24, and it took the game's first four shots.
Jonathan Huberdeau appeared to put the Panthers in front during the shootout, but was ruled to have pushed Enroth's pad across the line.
Thomas stopped a one-timer from Brayden McNabb about five minutes into the game.
After play was whistled dead because of a scrum in Florida's crease, John Scott tossed the puck in the net and received a penalty for unsportsmanlike conduct.
Enroth saved a shot by Alexander Barkov on the ensuing power play and made 13 saves in the period as Buffalo was outshot by five.
Buffalo broke through in the second period when McBain streaked into the slot to collect Steve Ott's pass and fired low past Thomas' right pad at the 5:13 mark.
Brian Flynn had a breakaway moments later but Thomas smothered the shot to keep the deficit 1-0.
Florida nearly equalized at the start of the third period. Tomas Fleischmann had the puck in front of Enroth and used a deft move to get the goalie moving but backhanded the puck off the post.
The Panthers finally beat Enroth at the 8:16 mark, after a weak clearance attempt by Alexander Sulzer. Enroth was slow to get up and Tom Gilbert took a slap shot that grazed Boyes, an ex-Sabre, on its way into the goal.
Florida had a goal disallowed when play was blown dead due to an injury to defenceman Dmitry Kulikov in the Panthers zone.
Thomas made a sliding stop on Brian Flynn in overtime.
Florida defenceman Brian Campbell played in his 800th career NHL game.
NOTES: It was Buffalo's first game since Jan. 4. A blizzard caused the postponement of Tuesday's game against Carolina. ... Florida's scratches were C Scott Gomez, D Mike Mottau and C Shawn Matthias. ... Tyler Myers sat out the first game of a three-game suspension for a hit to the head of Dainius Zubrus.