The Senators held a 2-1 lead with time running out in the second period, but Aleksander Barkow tied it on a deflection with 2:49 left in the stanza.
After Gilbert's power-play goal gave the Panthers the lead, Tomas Kopecky clinched the win with a shorthanded tally that came with 1:41 remaining.
Florida has won five in a row, its longest winning streak of the season. Scott Clemmensen earned the win with 32 saves after giving up a pair of first-period goals.
Craig Anderson suffered the loss while stopping 31 shots. It was Ottawa's fourth loss in six games.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Millions of Getty images now available for free via embed tool