Teuvo Teravainen, Hamilton and Sebastian Aho scored for the Hurricanes (25-21-6), and Ferland had two assists. Petr Mrazek made 28 saves.
"Ever since I've been here, it seems to work that way," Hurricanes coach Rod Brind'Amour said. "All the guys did well. It was a good game and there was a lot of excitement, but obviously we needed to win a lot more than they did."
Teravainen put Carolina ahead 1-0 at 4:03 of the first period after a Calgary turnover. Sebastian Aho intercepted a TJ Brodie pass and set up Ferland, who passed to Teravainen for a tap-in.
Lindholm redirected Mark Giordano's shot and tied the game 1-1 with a power-play goal at 7:56.
"That was cool," said Lindholm who has a 10-game point streak (three goals, nine assists). "Obviously it's kind of weird to be back here and play on the other side of the rink, but it's surreal that all of us scored. It's nice, but the two points is all that mattered."
Ryan gave the Flames a 2-1 lead at 7:39 of the second period when he circled the net and scored on a wraparound inside the left post.
Hathaway's shorthanded goal at 12:34 gave the Flames a 3-1 lead. Ryan gathered a loose puck in Calgary's defensive zone and led a 2-on-1 before delivering a pass to Hathaway at the top of the crease.
"(Ryan's) was a huge goal, but subtle little things too, big on face-offs, a real good play on the shorthanded goal," Peters said. "He was real good, probably a little extra juice coming back into PNC Arena."
Carolina cut the lead to 3-2 on a snap shot from Hamilton with 1:33 remaining in the second period.
Hanifin's slap shot from the center point put Calgary up 4-2 at 13:05 of the third period.
Aho scored on a one-timer with 55 seconds left to make it 4-3.
"We know where we are in the standings and we want to win every game," Hamilton said. "It [stinks] when we lose. We talk about one day at a time and move on and keep getting better every day."