Juri Hudler had given Calgary (7-11-3) a 4-3 lead with less than four minutes left in the game, but the Jets didn't let up and Bryan Little tied it 4-4 with six seconds left.
With Winnipeg goalie Al Montoya on the bench for the extra attacker in the final 30 seconds of regulation, the Jets (10-10-3) swarmed goalie Reto Berra and Little put a rebound in an open side of the net.
Montoya faced 28 shots in regulation and five in overtime. Berra was barraged by 47 shots, including three in overtime.
Flames Michael Cammalleri scored his team-leading ninth goal of the season on the power play and added an assist. T.J. Brodie and Lance Bouma also scored.
Michael Frolik, Olli Jokinen and Dustin Byfuglien also scored for Winnipeg, and defenceman Grant Clitsome and Blake Wheeler added a pair of assists.
Byfuglien tied the game 3-3 with 7:50 left in the third period, scoring his fifth goal in as many games on the power play off a rebound.
But Calgary regained the lead when Hudler blasted a shot from the top of the face-off circle that cut by Montoya with 3:26 left to go ahead.
Calgary was 0-5-1 in their last six games heading into the match.
Winnipeg had a four-game home winning streak halted, but are 4-2-1 in their last seven games.
The Jets outshot the Flames 11-6 in the scoreless first period and 23-9 in the second.
Just 18 second after Clitsome was called for tripping in the second period, Cammalleri scored on a shot from a sharp angle after Lee Stempniak sent a pass to him across the front of the net at 9:01.
Winnipeg evened it up two minutes later when Byfuglien's shot from the point ended with Frolik using a rebound to tally his fifth goal of the season at 8:43.
Byfuglien has seven points in his past seven games, including four goals.
Brodie's goal was a deflection that made it 2-1 at 15:24.
The second period ended with fists flying in several pairings, but big Byfuglien grabbed Chris Butler and Ladislav Smid at one time.
Byfuglien got four minutes for roughing and the Flames started the final period on their third power play, but couldn't convert.
A minute after getting out of the box, Byfuglien went in again for tripping, but Calgary couldn't convert the opportunity.
Stempniak was pushed into Montoya by a Jets player and the goalie went down on the ice for bit, but remained in net.
Jokinen scored at 8:16 to make it 2-2 when Berra appeared screened by two of his teammates and the puck went through his legs.
Calgary hosts Columbus on Wednesday and the Jets take on the visiting Chicago Blackhawks on Thursday.