The Flames took a 1-0 lead at 9:41 of the first period. Farabee came off the bench with speed, split two Anaheim defenders and redirected a pass from Ryan Lomberg into the net.
Farabee credited teammate Adam Klapka with making a line change at the right time.
"He saw we had possession and he made the decision to come off, and it let me come on the ice with a lot of speed and 'Lombo' made a great pass," Farabee said. "If he doesn't change at that point, I don't score."
Gauthier tied it 1-1 at 11:14 of the second period.
Cooley stopped two of Gauthier's shots before Gauthier banked the puck off Cooley's shoulder from below the goal line. The puck popped in the air, slid down Cooley's back and rolled into the net.
“Their goalie played a really good game," Gauthier said. "We had a lot of shots on him."
Sharangovich put Calgary up 2-1 with a power-play goal at 16:10, scoring bar down from inside the edge of the right face-off circle through traffic over Dostal's right shoulder.
Gauthier tied it 2-2 on the power play at 10:41 of the third period with a one-timer from the right circle that beat Cooley to the glove side off a touch pass from Jackson LaCombe.
Dostal stopped one of the first two Flames shootout attempts before Matvei Gridin hit the left post to give the Ducks the win.
"We're ready to play 60 minutes," Dostal said. "We are always there, always ready to play for a whole 60 minutes and we have young legs, young guys and we skated the whole game, so that's been our strength, I believe."