Gionta scored the winner for the Canadiens at 15:46 of the second. Panthers captain Ed Jovanovski gave the puck away softly behind the Florida net to Tomas Plekanec, who fed a wide-open Gionta for his seventh goal of the year.
The win was Montreal's first against Florida this season. The Panthers beat the Habs twice last month.
Montreal opened the score at 6:23 of the first period on the team's first shot on net. Desharnais used Panthers defenceman Tom Gilbert as a screen to beat Thomas with a shot to his left.
Desharnais took a pass from Max Pacioretty while crossing the blue-line to start the play, fanned on the initial shot, but recovered to score his sixth goal of the year, on the backhand.
Montreal gained momentum after the goal, outshooting Florida 9-0 over the next 10 minutes.
But it was the Panthers that equalized against the run of play. Bergenheim beat Price at 17:09 with a backhand goal similar to Desharnais's earlier shots.
Rookie Aleksander Barkov had an assist on the goal, his team-leading 15th of the year, to extend his point streak to six games — the longest point streak by a rookie in Panthers history.
Bergenheim almost gave the Panthers the lead a minute later, but his shot rang off the crossbar.
Florida took 16 shots on Price in the third period, but couldn't find the equalizer.
The Panthers and Canadiens meet for the fourth and final time this season on March 29 in Sunrise, Florida.
Notes: Jovanovski was back in the Panthers' lineup after undergoing hip surgery last April. He made his season debut on Saturday in a win over the Nashville Predators. … Ryan White missed the game due to an upper-body injury sustained on Thursday against the Dallas Stars. He is expected to be out two weeks. … Pacioretty finished the game with nine shots on net. … Hockey Canada will announce its Olympic roster on Tuesday. Montreal's Price and defenceman P.K. Subban are expected to make the cut. … The Canadiens head to Philadelphia to face the Flyers on Wednesday.