Gauthier, who has consecutive two-goal games, took a drop pass from Leo Carlsson on the rush and scored with a wrist shot from the slot to end it.
Frank Vatrano and Gauthier scored eight seconds apart late in the third period to force the extra period, and Ville Husso made 36 saves for the Ducks (35-35-8), who had lost two of three.
Mikael Backlund had a goal and an assist, and Dustin Wolf made 18 saves for the Flames (37-27-14), who sit five points behind the St. Louis Blues for the second wild card into the Stanley Cup Playoffs from the Western Conference with two games in hand.
Vatrano scored with a one-timer from the bottom of the right circle to cut it to 3-2 at 16:03, and Gauthier scored from the inside edge of the left circle off the ensuing face-off to tie it 3-3 at 16:11.
The Flames took a 1-0 lead at 14:18 of the second period.
Anaheim tried to rim the puck out of their zone but it was poked away, leading to a wrist shot from just inside the blue line by MacKenzie Weegar that was tipped into the net by Backlund.
Oliver Kylington made a long pass from the left point to Trevor Zegras in the right circle, who stopped the puck before shooting it over the right shoulder of Wolf to tie it 1-1 at 11:49 of the third.
Yegor Sharangovich scored his own rebound to give the Flames a 2-1 lead at 13:55, and Matt Coronato scored on a drive to the net to make it 3-1 at 15:18.