Heading into the tilt, Calgary - of course - were perched atop the Western Conference and sitting second overall in the NHL behind only the Tampa Bay Lightning.
Detroit, on the other hand, was waaaaaaaay down in 28th spot.
But the Red Wings came out flying, giving the Flames everything they could handle as the two teams combined for 71 shots.
The Wings led 4-3 with just over 11 minutes to play before the hometown heroics unfolded.
Mark Giordano, Sam Bennett - with his second of the night and the game-winner - and TJ Brodie into an empty-net secured another two points for the Flames, who got back in the win column after falling 4-3 in overtime to Buffalo in the fourth tilt of this five-game homestand Wednesday night.
Sean Monahan and James Neal also scored for Calgary, while Mike Smith made 31 saves.
Dylan Larkin had two goals for Detroit, with Anthony Mantha and Mike Green also tallying.
"It's a great feeling, no matter what the score is in the game to have confidence in our group to be able to come back," said Bennett. "Obviously it's not the position we want to be in as often as we are but to know we're never out of it is a great feeling."
Four times in the game the Red Wings took the lead but the Flames always had an answer.
"That's tough," said Bennett. "Most of the time that deflates you when that keeps happening but our team, we never sagged, we never got down on each other, (or) frustrated. (We) just kept sticking with it and that's the mentality you have to have."