Andy McDonald also scored and Chris Pronger had two assists for the Ducks (26-4-6), who have won 11 of 13 games and were coming off a 4-3 loss at San Jose on Saturday.
"The first home game after a long road trip is always a tough one, mentally, but I thought we overcame that pretty well," said goaltender Jean-Sebastien Giguere, who shrugged off a goal by Daymond Langkow on Calgary's first shot of the game and stopped the last 26 he faced to record his league-leading 22nd victory.
"This wasn't an easy game. Mentally, it was a challenge for all of us. But we showed a lot of leadership and mental strength. It wasn't pretty, but we got the job done," Giguere said.
The Flames, who had won 13 of their previous 18 games, have lost two of the three meetings with Anaheim while getting outshot 117-68. Miikka Kiprusoff, who handed the Ducks their only shutout loss this season, made 37 saves.
"We had a lot of scoring chances, but it's always dangerous when it's a tie game," said Pahlsson, who got the go-ahead goal with 16:36 to play. "It was a close game for a long time. But we found a way to win it, and that's what we've been doing the whole year. We've managed to win, even though we haven't played a perfect game every time."
Pahlsson used Calgary defenseman Mark Giordano as a screen and beat Kiprusoff to the stick side for his seventh goal after Rob Niedermayer skated the puck away from Langkow behind the net and fed it into the slot.
"It was a workmanlike type of goal," Anaheim coach Randy Carlyle said. "Those guys specifically don't get a lot of credit when the glory is handed out, but the one thing you can always look at with those players is their minutes played. Any coach will tell you that when you trust players, usually it reflects in their ice time. And those players have done an excellent job."
Penner made it 3-1 less than 5 1/2 minutes later with his 14th of the season. Pronger set up the goal with his 36th point, tops among NHL defensemen. It was the 100th point this season by Anaheim defensemen, the most in the league. He also assisted on Perry's empty-net goal during a power play with 1:07 remaining.
Giguere faced only one shot by the Flames in the first 11 1/2 minutes, but it found the net. Langkow beat him low to the stick side just 1:40 in with his 11th goal, a 20-foot wrist shot from the slot while defenseman Sean O'Donnell was screening his goaltender.
McDonald tied it just 39 seconds before the period ended, redirecting a backhanded centering pass from Chris Kunitz for his 11th goal.
"We had our chances in the second period," Jarome Iginla said. "We were drawing penalties and getting power plays, but we didn't get a goal. We went into the third period 1-1 and they won that period. They raised their game more than we did."
Calgary had the first five power plays of the contest and came up empty. The Ducks received their first advantage at 17:54 of the second period when Tanguay was shoved from behind by Todd Marchant's stick and subsequently penalized for diving.
"We did a lot of things well. But when you take five straight penalties, those are the things you've got to really improve on," Carlyle said. "Our penalty killers and our goaltender came up large in those situations and gave us an opportunity to gain some energy get our game going."
The Ducks have scored at least one third-period goal in 13 consecutive games. ... Anaheim is the only team that hasn't allowed a short-handed goal. ... The Calgary trio of RW Darren McCarty, C Jamie Lundmark and LW Jeff Friesen are among nine NHL forwards who have played at least 27 games and not scored a goal. ... The Ducks have beaten Calgary five straight times at home, and 12 times in 15 meetings in Anaheim. ... Iginla has nine goals and nine assists in his last nine games. ... Anaheim has scored at least one power-play goal in 17 of 19 games.
Copyright by STATS LLC and The Associated Press
Arena: Honda Center Location: Anaheim, California
Referees: Steve Kozari, Dan O'Halloran Linesmen: Shane Heyer, Brian Mach
Attendance: 17,174 (100.0% full)
Team Stat Comparison
Power Play Goals
Power Play Opportunities
Shots on Goal
Daymond Langkow (11)
Assists: Alex Tanguay, Jarome Iginla
Andy McDonald (11)
Assists: Chris Kunitz, Teemu Selanne
No scoring this period
Samuel Pahlsson (7)
Assists: Rob Niedermayer, Travis Moen
Dustin Penner (14)
Assists: Chris Pronger, Jean-Sebastien Giguere
Corey Perry (9)
(Power Play) (Empty Net) Assists: Dustin Penner, Chris Pronger