"We need to win, as the only chance for us to get in might be to win these next five games," said Alex Tanguay, whose goal with 28 seconds left in the second period was the eventual winner.
"We're going to put our best effort in and hope that the out-of-town scoreboard is going to be favorable to us as well."
The Flames host Los Angeles on Wednesday night.
"We're going to give it our all; there's no holding back," Tanguay said. "We want to be in. We've worked so hard for the past two months, played some very good hockey. Haven't been as lucky as we'd like to be, but maybe this luck will come our way the last few games."
The Flames went into the game struggling offensively with six goals in their previous five games, but broke out with four goals over the final 11 minutes of the second period to overcome a 2-1 deficit.
Tied at 3-all, Calgary took its second lead of the second period when Mark Giordano's low slap shot eluded Dallas goaltender Kari Lehtonen for a power-play goal at 16:58.
Steve Ott's tripping penalty at 18:33 gave the Flames their fourth man advantage of the period. Cammalleri's attempted dump-in caromed into the slot off the skate of Stars defenseman Trevor Daley. Tanguay's quick shot was partially stopped by Lehtonen but still went over him and landed in the net at 19:32.
Jamie Benn scored two goals, and Mike Ribeiro and Philip Larsen also scored for Dallas. The Stars, starting a four-game road trip, have lost five of their past six away from home.
"You've got to learn how to win. The way we went about it doesn't look like we want to win. It really doesn't," Stars coach Glen Gulutzan said. "They've got to figure it out for themselves; they either want it or don't."
Dallas dropped out of the top spot in the Pacific Division and fell to seventh overall in the Western Conference after San Jose's 5-1 win over Colorado on Monday night.
Dallas had a 2-1 lead on a pair of Benn goals. His first goal came 26 seconds into the game, and his second was at 44 seconds of the second period.
However, that 2-1 lead quickly turned into a 3-2 disadvantage.
With Jarome Iginla about to check Ribeiro into the Dallas end boards, the Stars center passed the puck up into the slot to a wide-open Comeau. The Flames forward slapped his first goal in 16 games past Lehtonen at 9:16.
Forty-five seconds later, Ribeiro lost a faceoff to Iginla in the defensive end, and Cammalleri was fortunate to have the puck slide right to him when Anton Babchuk's shot from the blue line hit a player in front.
Ribeiro overcame that and tied the score at 3-all with a goal from a scramble at 14:29.
Dallas cut its deficit to 5-4 at 5:24 on Larsen's power-play goal.
Kiprusoff finished with 35 saves. Lehtonen stopped 30 shots.
Calgary went 3-for-6 on the power play.
Dallas LW Eric Nystrom was injured early in the first period and did not return. ... The Stars fell to 15-2-1 when Benn has a multipoint game... Lehtonen last gave up five goals in a game Jan. 3 in a 5-4 loss to Detroit.
Copyright by STATS LLC and The Associated Press
Arena: Scotiabank Saddledome Location: Calgary, Alberta
Referees: Greg Kimmerly, Steve Kozari Linesmen: Pierre Champoux, Don Henderson
Attendance: 19,289 (100.0% full)
Team Stat Comparison
Power Play Goals
Power Play Opportunities
Shots on Goal
Jamie Benn (25)
Assist: Steve Ott
Olli Jokinen (22)
(Power Play) Assists: Lee Stempniak, Curtis Glencross
Jamie Benn (26)
Assists: Adam Burish, Adam Pardy
Blake Comeau (5)
Mike Cammalleri (17)
Assists: Jarome Iginla, Anton Babchuk
Mike Ribeiro (17)
Assists: Michael Ryder, Alex Goligoski
Mark Giordano (9)
(Power Play) Assists: Jarome Iginla, Mike Cammalleri
Alex Tanguay (13)
(Power Play) Assists: Mike Cammalleri, Mark Giordano
Philip Larsen (2)
(Power Play) Assists: Sheldon Souray, Steve Ott