Stamkos re-directed a pass from Eric Brewer into the net, allowing the Lightning to halt a two-game skid.
Tampa Bay overcame the loss of a two-goal lead in the third period, surrendering the advantage when Rene Bourque and Olli Jokinen tallied for the Flames. Jokinen's power-play goal came with 3:12 to go in regulation.
Tom Pyatt, Ryan Malone and Nate Thompson delivered goals for the Lightning in the second period for a 4-2 lead.
Mathieu Garon saved 23 shots to get the win, which was only the second for Tampa Bay in nine games.
All five Lightning goals came against Miikka Kiprusoff, who made 34 saves.
Ray Liotta sues skin care company over use of likeness
NBC reportedly holds celebs hostage to Jimmy Fallon's show