CALGARY, Alberta -- Some key members of the Calgary Flames sat Thursday night with the flu. Things looked even more dire when Johnny Gaudreau left with an apparent injury in the first period.

Gaudreau returned and put Calgary ahead near the end of a wild third period, Sean Monahan had two goals and an assist and the Calgary Flames overcame Rasmus Ristolainen's hat trick in a 4-3 victory over the Buffalo Sabres.

Gaudreau exited after being shaken in a collision but returned for the second period. In the third period, he worked a give-and-go with Monahan, then zipped a low shot through Chad Johnson's pads with 4:50 left for the 4-3 lead.

More from FoxSports

"It wasn't one of our best games but we found a way," said Monahan, who tied a career-high for points in a game. "When you make costly mistakes like that, it obviously hurts you, but right now we have that confidence in this room we're gonna come back in games and tonight we did it again."

Markus Granlund also scored in Calgary's fourth straight win. Jonas Hiller stopped 27 shots.

Ristolainen scored three goals in the final period, including a tying tally with 5:45 remaining. That one came when he banked a shot from the corner off the skates of Flames defenseman Dennis Wideman and past Hiller.

Karri Ramo was supposed to start his 16th game in his last 17 but came down with a worse flu than what was already ailing Hiller, who had to leave practice early on Wednesday and was not on the ice at the morning skate Thursday.

"You should've been in the locker room around 5:30, quarter-to-6 when the medical staff runs in the coach's office saying `Guys are puking everywhere,'" Hartley said. "You have Karri Ramo in the laundry room and you have Jiri Hudler in the doctor's room and they're throwing up and they're white like ghosts and suddenly you look at Jonas Hiller and he's coming in, and he's whiter than a snowman."

Monahan has eight goals and 14 points in his past 14 games, including seven points (three goals, four assists) in his past four. In the season's first 14 games, he had just two goals and eight points. Monahan is now tied with Gaudreau for the team lead with 10 goals.

"Mony's a great student. He pays attention, he works at his game in practice and obviously he is showing progress and he deserves it," Flames coach Bob Hartley said.

The Flames have won eight in a row at home for the first time since Feb. 23 to March 27, 2013. The franchise record is 10 straight.

Johnson turned away 28 shots.

In the six-team logjam behind Los Angeles in the Pacific Division, the Flames are tied with Edmonton for fewest points, yet are just four points back of second-place Vancouver and with two games in hand.

The Sabres were 3-0-1 in their previous four games before heading to Western Canada for a three-game trip, but return home having lost all three games, including losses to the Canucks and Oilers.

"They outworked, they outbattled us and that's not the way we should play, especially the situation -- three losses, tough road trip," Ristolainen said.

Monahan opened the scoring at 5:46 of the second period. Brandon Bollig began the sequence with a pass back to Wideman at the blue line. His shot was stopped, but Monahan picked up the loose puck and fired into the net.

With 8 seconds left in the second, Granlund gave Calgary a two-goal cushion by converting a setup from Joe Colborne for his third goal in the last five games.

Ristolainen erased the Flames' lead with a pair of power-play goals to open the third.

Monahan's go-ahead goal at 9:25 came on a setup from Gaudreau, who found him alone in front. From there, he fired his 10th of the season.

It was only Hiller's second start since the end of October. He gave up five goals on 29 shots in a loss to San Jose on Nov. 28.

Notes: Jiri Hudler (flu) was a scratch for Calgary. In his absence, Bollig played for the first time in six games. ... Hartley coached career game No. 890, moving him ahead of Punch Imlach and into 31st on the NHL career list.