Grigorenko beat Zachary Fucale with a backhand on Buffalo's second attempt in the tiebreaker.
The Sabres, who never led in the game or overtime, erased four one-goal deficits in regulation. Colton Gillies drew Buffalo even at four when he backhanded his rebound past Fucale 15:36 into the third.
Michael Bournival scored twice for the Canadiens. Martin St-Pierre scored Montreal's second power-play goal of the game 12:59 into the third to give the Canadiens their fourth one-goal lead.
Fucale, who stopped 11-of-13 shots, was drafted 36th overall in the second round by the Canadiens in June after winning the Memorial Cup with the Halifax Mooseheads. Montreal starter Peter Budaj made 10 saves.
Buffalo's Patrick Kaleta was given a double minor for roughing 10:41 into the third when he tried to pick a fight with Galchenyuk after the Montreal left wing flattened McBain with an open-ice hit.
Bournival put the Canadiens up 1-0 with his first goal of the game 15:18 in on a pass from Michael McCarron, who was chosen 25th overall with Montreal's first-round pick in the June draft.
The Sabres erased deficits of 1-0 and 2-1 early in the second as the two teams combined for three goals in under three minutes.
Girgensons scored a short-handed goal 58 seconds into the second to tie it at one before Bournival gave Montreal another one-goal lead with his second goal at the two-minute mark.
McBain tied it at two at 3:52 with a shot from the slot into the top right corner after taking a centring pass from Steve Ott.
Buffalo's Cody McCormick had his second fighting major of the game 5:13 into the third, when he also drew a roughing minor for his bout with Canadiens defenceman Davis Drewiske. McCormick was given an instigating minor and a misconduct for his fight with Jarred Tinordi with 22 seconds left in the first.