Matt Stajan and Johnny Gaudreau then replied with goals in the first period before adding another goal each in the second as the Flames rallied for a 6-3 win.
"After the first two goals they got we just settled down a bit," said Stajan, who tallied his second two-goal game of the season. "There was lots of hockey left to be played. We were able to tie the game up and the focus was to win the last two periods. We got good contributions throughout the lineup tonight and we need that to win on a nightly basis here."
Sean Monahan and Jiri Hudler also scored for the Flames (37-25-5), who returned to play at the Scotiabank Saddledome for the first time since suffering a 6-3 setback to the Ducks on Feb. 20.
"We wanted to come back home and we wanted to have a good showing for the fans because they've been a huge part of our success and backing us," said defenceman Kris Russell, who had three assists to give him eight points in his past three games. "I thought it was a good night to do that."
Russell's defence partner Dennis Wideman also chipped in with three assists, while goalie Kari Ramo finished with 29 saves to improve his record to 13-7-1.
Thanks to the win, the Flames moved to within one point of the Vancouver Canucks (38-24-4) for second spot in the Pacific Division.
Ryan Getzlaf had two goals for the Ducks (42-20-7), but also took two costly penalties in the second period that led to a pair of power-play goals by the Flames.
"I never want to be the guy sitting in that box when that happens," Getzlaf said. "It kills momentum for our team and I've got to accept that. I let the guys down in that aspect in taking those kinds of penalties. It's not acceptable and I'll wear that for the next one."
Hampus Lindholm also scored for Anaheim, while goalie John Gibson finished with 17 saves.
"It came down to will and want," said Anaheim coach Bruce Boudreau. "They wanted to win battles and they won the battles on the boards and the one-on-one battles. Everybody thinks that, oh yeah we're in first place, but I mean it's within 10 points of the wild card and we've played more games than everybody else, so we've got to get our act in gear right now."
Getzlaf picked off an errant pass by David Jones in the Calgary zone and quickly beat Ramo with a shot over his left pad to put the Ducks up 1-0 just 22 seconds into the game.
Getzlaf scored again at 2:51 when he deposited a rebound into a wide open Calgary net with Ramo out of position after he stopped the initial shot by Ryan Kesler.
The Flames fought back with goals by Stajan and Gaudreau before the end of the first period, which ended with Calgary up 16-11 in shots.
The Flames then scored three goals on four shots in the second to build up a 5-2 lead. Stajan redirected a pass from Michael Ferland past Gibson at 7:28 before Monahan scored during a Calgary man advantage 85 seconds later.
Gaudreau added another power-play goal for Calgary at 13:59 before Lindholm wired a point shot past Ramo exactly five minutes later to pull the Ducks within two goals.
Despite the fact that the Flames were outshot 9-3 in the third by the Ducks, Hudler scored the lone goal of the period at 15:17.
Notes: Gaudreau now has 18 goals to go with 32 assists in 66 games. He's the first Flames rookie to reach 50 points since Jarome Iginla had 21 goals and 29 assists in the 1996-97 season. … While the Tim Hortons Brier was being contested at the Saddledome from Feb. 28 to March 8, the Flames went 4-2-1 on their season-long road trip.