CALGARY — Even as Johnny Gaudreau struggled through a scoring slump, he never doubted himself.

Gaudreau erupted for a hat trick and a career-high six points as the Calgary Flames reeled off six unanswered goals in the third period to rally past the New Jersey Devils 9-4 on Tuesday. Gaudreau entered the night with no goals in his previous nine games and just one in his last 19 games.

"I knew I still had it, they just weren't going in," said Gaudreau, whose 33 goals and 90 points on the season are career highs, passing his 30 goals from 2015-16 and his 84 points from last season.

"Sometimes you're fighting the puck, sometimes you're feeling good, you're getting looks, you're making plays up and down the ice," Gaudreau said. "Our line was clicking tonight. We knew we had some jump from warm-ups and we came in the locker room and we knew we were going to have a good night."

Linemates Sean Monahan and Elias Lindholm had a goal and three assists each.

"He was feeling it today. Just give him the puck and he was making plays all over. For us, to just get open, it was fun to see him like this.", "Our last couple weeks haven't been great, so it's nice to bounce back and hopefully we can keep going like this," said Lindholm.

Momentum in the game took a sharp turn early in the third period.

Derek Ryan scored 41 seconds into the period to tie it 4-4 and then Gaudreau was hooked from behind on a breakaway by Damon Severson, leading to a penalty shot.

Gaudreau made no mistake, slowly winding his way in before ripping a shot past Mackenzie Blackwood to give Calgary the lead.

"Johnny's a special player and he had a great statement night for himself," said Monahan. "That's a big goal. Important time. He put that in and we started to ride with it."

Making it three goals in less than two minutes, Calgary went ahead 6-4 at 2:37 when Ryan was set up by Gaudreau on a two-on-one. Patiently holding on to the puck, Gaudreau froze Blackwood and the Devils defenceman, before sending the puck across to Ryan who was left with a wide-open net.

"You know that when he gets the puck on his stick, he's looking for you, he's a dynamic passer and he just filters it right through the guy's legs for a backdoor tap-in. That's pretty nice," said Ryan.

Gaudreau capped off his big night at 12:01, converting a pass from Monahan, and sending hundreds of hats pouring onto the ice.

Sam Bennett and Matthew Tkachuk also scored for Calgary (43-20-7). The Flames remain one point back of the Pacific Division and Western Conference-leading San Jose Sharks, who won 5-4 in Winnipeg.

Blake Coleman, Travis Zajac, Kyle Palmieri and Kenny Agostino scored for New Jersey (25-36-9). The Devils are winless in their last seven (0-6-1).

"When you look at what happened in the third period, the first goal is fluky and then after that it was just mental mistakes that can't happen. We have to be a much smarter group than that and more attention to detail," said Devils coach John Hynes.

Peppered with 39 shots, Blackwood was in net for all nine goals and fell to 6-8-0.

"It's a tough one, for sure," said Blackwood. "It's just unacceptable from myself and everyone else in the lineup. It starts with me and ends with me."

Devils captain Andy Greene defended Blackwood's outing, shifting the blame to the team in front of him.

"If you go and look back at all their goals, what could you do on any of them, literally," the defenceman asked. "All point-blank. All back-door. All breakaways. He fought really hard tonight and played really well and we were garbage in front of him."

David Rittich had 22 stops for the win to improve his record is 24-7-5.

Notes: Michael Stone (blood clot) rejoined the Flames after a conditioning stint in the American Hockey League. His last NHL game was Nov. 11. Along with Oliver Kylington and Dalton Prout, that makes three extra, healthy defencemen.