Cogliano and Getzlaf each had a goal and an assist, with Getzlaf putting the Ducks ahead on a fluke score near the midpoint of the third period as Anaheim spoiled the Calgary Flames' perfect record with leads after two periods.
"We needed this win. Bottom line," said Cogliano, whose goal with 4:52 left in the second cut the Ducks' deficit to 2-1 heading into the third period. "I don't think we've been playing the game we've been wanting to as of late and I guess there's no better team to beat in that situation than the Flames since they've been so strong."
Getzlaf's slap shot from the blue line went over the net and caromed back off the end boards, deflecting in off the back leg of Flames goalie Jonas Hiller at 8:53 of the third to put Anaheim up, 3-2.
"It's nice to have one bounce that way right now," Getzlaf said. "I felt like I've been shooting the puck a little bit more lately and haven't been able to hit the net a whole lot. It was nice to miss the net on that one."
Francois Beauchemin had tied the score less than three minutes earlier.
The third-period comeback gave Anaheim its eighth win in 24 games when trailing after two. Calgary leads the league with 10 wins in such circumstances, and the Flames lost for the first time in 15 games this season when leading after 40 minutes.
Kyle Palmieri, Jakob Silferberg and Hampus Lindholm also scored in the third, and John Gibson finished with 25 saves to help the Ducks get their second win in seven games (2-4-1).
"That was as big of a win as we've had all season," Cogliano said.
Palmieri got the eventual winner, making it 4-2 at 11:35. Mikael Backlund mishandled the puck in front of his net and when Hiller couldn't smother it, Palmieri was right there to jam it in.
"All our forwards in the last half of the game were really good but you could tell that Cogliano and Getzlaf, two veteran players, stood up and took the bull by the horns, so to speak, and led the way," Ducks Coach Bruce Boudreau said.
It marked the second time in franchise history Anaheim scored five goals in the third period. The other was Jan. 23, 2004.
"They were just the better team, they wanted it more than us," said Lance Bouma, who scored his 12th of the season for Calgary. "We got back on our heels after we let in a couple goals and that's not something you can do."
Matt Stajan and Sean Monahan also scored for the Flames, and Hiller stopped 32 of the 37 shots he faced.
"They were better than us in the third, simple as that," Monahan said. "We've got to be better in the third, we know it as a group."
DUCKS AT EDMONTON
When: 4 p.m. PST Saturday.
On the air: TV: Fox Sports West; Radio: 830.
Etc.: Struggling to stop goals of late, the Ducks can take heart the last-place Oilers are next-to-worst in goals scored in the Western Conference. Former Ducks goalie Viktor Fasth is 6-15-3 in Edmonton.