Matt Stajan and Johnny Gaudreau replied with goals in the first period then another goal each in the second as the Flames rallied for a 6-3 win on Wednesday night.
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 a 6-3 loss to the Ducks on Feb. 20.
With the win, the Flames moved within one point of the Vancouver Canucks (38-24-4) for second place in the Pacific Division.
"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."
Kris Russell had three assists to give him eight points in his past three games, while his defense partner Dennis Wideman set up a pair of goals.
"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," Russell said. "I thought it was a good night to do that."
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."
Kari Ramo stopped 29 shots for Calgary.
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."
It wasn't a great start for the Flames as 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 stopping the initial shot by Ryan Kesler.
The Flames then fought back.
They 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. Monahan scored during Calgary's man advantage 85 seconds later.
Gaudreau scored 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 being 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 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-high road trip.