ANAHEIM -- John Gibson made 51 saves, and Ryan Kesler got his fourth NHL hat trick to lift the Anaheim Ducks to a 4-3 shootout win against the Philadelphia Flyers at Honda Center on Sunday.
Gibson's 51 saves are the most in Ducks history, and many came after he was replaced by Jonathan Bernier for 3:48 early in the second period.
After Philadelphia forward Brayden Schenn scored to tie the game 3-3 at 3:06, Anaheim coach Randy Carlyle pulled Gibson to calm him and to set a new game plan.
WATCH: All Flyers vs. Ducks highlights
"The whole idea was to use it as a timeout," Carlyle said. "I told Bernier he was only going in until the media timeout: 'Give us three minutes.'"
The Ducks said they saw a sharper, more focused goaltender when Gibson returned.
"He showed that he was mentally strong," Kesler said. "He was controlling his rebounds better and just mentally and physically more sound."
Corey Perry scored the deciding goal in the fifth round of the shootout for the Ducks (19-12-8). Rickard Rakell scored for Anaheim in the first round, and Philadelphia's Jakub Voracek scored in the third.
The Flyers outshot the Ducks 55-25, including 38-13 in the first and second periods.
"It's not something that happens every day, but it was a big test," Gibson said. "There are games when I'll only see 15 shots. Sometimes you'll see more than others, and that was the case tonight."
Travis Konecny and Sean Couturier also scored for Philadelphia (20-14-5), which has lost four straight games (0-3-1).
After injuring his hand and leaving a 2-0 loss at the San Jose Sharks on Friday after the first period, Flyers goalie Steve Mason returned to make 22 saves.
"It's not fun when they're not going in, but we have to keep plugging away," Philadelphia defenseman Michael Del Zotto said. "It's part of the game. Every team has great goalies. Their job is to make saves, so you're not going to score every time. You want to look at the positives and try to build off that."
Kesler made it 1-0 at 7:55 of the first period by tipping in a backhand feed from defenseman Korbinian Holzer.
Konecny tied the game 1-1 19 seconds later when he collected his own rebound and banked it in off Gibson's pad.
Kesler scored again at 16:54 of the first to give the Ducks a 2-1 lead, and then completed his hat trick 1:09 into the second period to put Anaheim up 3-1.
But Couturier (1:46) and Schenn (3:06) scored 1:20 apart to tie it 3-3.
"You really couldn't fault [Gibson] on the goals," Carlyle said. "It was poor defensive-zone coverage from our perspective."
Ducks center Ryan Getzlaf left the game early in the third period with a lower-body injury.
Gibson faced an NHL career-high 54 shots, three shy of the most in Ducks history. Bernier made one save in his brief appearance.
Goal of the game
The Ducks' second line caught the Flyers on a line change, and Kesler completed his hat trick as a result. Kesler took a pass from Andrew Cogliano in the neutral zone, broke free and snuck a shot under Del Zotto's stick and through Mason's legs. "It's been awhile since I've had one," said Kesler, who had not scored three goals in a game since April 7, 2011, with the Vancouver Canucks. "Feels good to get one again."
Video: PHI@ANA: Kesler taps home Holzer's great feed
Save of the game
Del Zotto got off a wrist shot so heavy that it knocked Gibson's helmet off when he used his head to make the save with 42 seconds left in overtime.
Unsung performance of the game
Ducks defenseman Cam Fowler played a game-high 29:15 and had one hit, one blocked shot, and two takeaways.
Highlight of the game
Konecny, who was a healthy scratch against the Sharks, had a quality chance off the rush but was stopped by Gibson. The rookie stayed with it and banked the puck in off Gibson's pad on the second effort for his fifth goal.
Video: PHI@ANA: Konecny banks rebound in off Gibson's pad
They said it
"We were playing shinny, and they were playing NHL hockey." -- Ducks coach Randy Carlyle on the Flyers having 55 shots on goal
"[Ducks goalie John Gibson] played a good game. I thought we played really well. We played better than them. He played really well, and as a result they have the two points and we don't." -- Flyers forward Wayne Simmonds
Need to know
The Ducks are 2-9 in games decided in overtime or the shootout. … The Flyers are 4-1 in overtime and 8-5 in games decided past regulation. … Ducks defenseman Sami Vatanen returned to the lineup after missing three games with the flu. … The Flyers activated forward Matt Read off injured reserve Sunday. He had two shots on goal in 14:53 of ice time.
Flyers: Host the New York Rangers on Wednesday (8 p.m. ET; NBCSN, TVA Sports, NHL.TV)
Ducks: Host the Detroit Red Wings on Wednesday (10:30 p.m. ET; FS-W, FS-D, NHL.TV)
Video: Gibson's strong effort lifts Ducks past Flyers, 4-3