Sean Monahan scored a power-play goal 35 seconds into the third period and the Flames beat the Devils 3-1 on Wednesday night to move into a Western Conference wild-card spot.
"These were points that we desperately needed," Flames goalie Karri Ramo said after making 26 saves to help the Flames snap a three-game losing streak. "You could see that we were desperate enough to earn a win."
Calgary, which lost 1-0 at the New York Rangers on Tuesday, moved one point ahead of idle Minnesota in the playoff race.
Curtis Glencross scored late in the second period to tie it 1-1, and T.J. Brodie added a short-handed, empty-net goal in the final minute for the Flames, who have 19 wins in games in which they have trailed (10 wins) or were tied (nine wins) after two periods.
"Any time you get a goal in the last minute of a period, it gives you a huge momentum swing," Glencross said. "We got that goal and got the momentum."
Monahan's winner was set up in part when Devils defenceman Jon Merrill took a slashing penalty at the end of the second period.
The Flames kept the puck in the Devils end, and Mark Giordano took a pass from fellow defenceman Dennis Wideman, skated to the dot in the right circle, and sent a cross-ice pass that Monahan redirected past Schneider for his 21st goal.
"They're not a team you can sleep on," said Cory Schneider, who made 23 saves but gave up two Calgary goals in a 49-second span bridging the second and third periods. "I think they lead the league in comebacks and they showed again tonight they're opportunistic.
"We gave them an inch on both plays and they took advantage of it."
Mike Cammalleri scored his fifth goal in four games for the Devils, who had a season-high, four-game winning streak snapped. They remain eight points behind Boston in the race for the No. 8 spot in the Eastern Conference. The Bruins play at New Jersey on Friday to close out the Devils' six-game homestand.
"Every game is more important than the next," Devils president and general manager Lou Lamoriello said.
The Devils received a power play with 47 seconds left when Mikael Backlund was called for delay of game, but Brodie scored seven seconds later to ice the game.
Ramo protected the lead the rest of the way, making power-play saves on Cammalleri and Eric Gelinas, and stopping Tuomo Ruutu on a 3-on-2 rush with less than nine minutes to go.
The Flames, playing the second contest of a seven-game trip, got even 1-1 on Glencross' ninth goal.
Joe Colborne carried the puck into the Devils zone and sent a backhanded pass through the crease to a wide-open Glencross, who redirected the puck under the crossbar.
"We have to keep winning games," Glencross said. "The spot we're in, we can't afford to lose two games in a row."
Cammalleri had given the Devils a 1-0 lead with 2:57 left in the opening period. The former Flames forward picked up a loose puck at centre ice, after a turnover by Brodie, and slid a pass to Jordin Tootoo.
Tootoo carried the puck into the Flames end and dropped a pass back to Cammalleri, who beat a screened Ramo with a backhander between the pads.
Cammalleri almost extended the lead late in the second period, hitting the post.
Schneider, who shut out Arizona on Monday, and Ramo, who played his second game in two nights, were outstanding in the first 40 minutes.
Ramo had excellent saves on Steve Bernier and Tootoo in close on an early power play, and he made a stop on Scott Gomez's drive from low in the right circle midway through the second period.
Schneider stopped Jiri Hudler on a breakaway with 4:11 left in the first period, and he made a snapping glove save on Giordano's slap shot on a power play.
NOTES: Tootoo has points in a season-high four straight games. ... Flames LW Johnny Gaudreau, from Carneys Point, New Jersey, helped set up Monahan's goal. He is second among NHL rookies in scoring with 15 goals, 29 assists and 44 points, trailing Nashville's Filip Forsberg. ... This marked the first time since 1989 the Flames played the Rangers and Devils on consecutive nights on the road. They will visit the Islanders on Friday. ... New Jersey had at least one point in 14 of its previous 16 home games (11-2-3). ... Calgary hasn't allowed a power-play goal in 13 straight games.