Buffalo was playing its first Stanley Cup Playoff game since April 26, 2011.
Tage Thompson had two goals and an assist, Alex Tuch had a goal and an assist, and Ukko-Pekka Luukkonen made 17 saves for the Sabres, who are the No. 1 seed from the Atlantic Division.
David Pastrnak had a goal and two assists, and Morgan Geekie had a goal and an assist for the Bruins, who are the first wild card from the East. Jeremy Swayman made 34 saves.
Thompson started the Sabres' comeback by cutting it to 2-1 at 12:02 of the third period. He got control of a loose puck behind the net and wrapped it inside the right post past the left skate of Swayman, who was looking the other way.
Thompson then tied it 2-2 at 15:44, scoring five-hole from below the left circle after Tuch forced a turnover behind the net by Andrew Peeke.
Mattias Samuelsson gave Buffalo a 3-2 lead just 52 seconds later at 16:36. He beat a screened Swayman high to the blocker side with a wrist shot from the top of the left circle.
Tuch added an empty-net goal at 18:48 to make it 4-2.
Pastrnak scored a power-play goal to make it 4-3 with eight seconds remaining, but the Bruins weren't able to win the ensuing face-off and get one final attempt on net.
Geekie gave Boston a 1-0 lead at 10:52 of the first period. Rasmus Dahlin blocked Pastrnak’s initial shot, but Geekie skated into the puck at the right hash marks, where he beat Luukkonen glove side with a slap shot.
Elias Lindholm made it 2-0 at 1:08 of the third period. Luukkonen stopped Geekie's one-timer from point-blank range, but Lindholm buried the rebound in the bottom of the right circle.