Stafford scored three times, including the overtime-forcing goal with 28 seconds left in regulation, as the Sabres rallied from a first-period, two-goal deficit and pulled out a 7-6 win on Tyler Ennis' decisive shootout tally Saturday night.
"You don't want to fold up when you're down. It's not in your game plan," said Stafford, who has four career hat tricks - two in eight games. "We knew if we kept battling, we had a chance to take this game."
The dramatic finish overshadowed the mistakes Buffalo made in allowing four goals on the first 11 shots.
Jason Pominville had two goals and two assists, and Thomas Vanek had a goal and assist as the Sabres improved to 4-0 in shootouts this season. They won consecutive games for the first time since Dec. 3-4.
"There were a lot of sloppy plays," Pominville said, referring to how the Sabres found themselves trailing 4-2 within the first 15 minutes. "But we dug deep and found a way at the end."
If the Sabres intend to make a playoff push, folding was not an option. Buffalo began Saturday 12th in the Eastern Conference.
Stafford forced overtime by scoring in the closing seconds of a game that featured three lead changes.
After Ennis gave the Sabres a 3-2 lead in the shootout, Zdeno Chara lost control of the puck and shot wide on the Bruins' final chance.
Tyler Seguin had a goal and assist, and Brad Marchand also scored for the Northeast Division-leading Bruins, 3-0-2 in their past five. Boston lost for the fourth time (19-1-3) in a game in which it led this season.
"With the leads we had, we should have won the game easily," Bruins goalie Tim Thomas lamented.
Thomas stopped 16 shots over the final two periods and overtime in place of Tuukka Rask, who was pulled after allowing three goals on 16 shots in the first period. Thomas didn't stop a shot during the shootout, allowing Pominville, Vanek and Ennis to score.
Bruins coach Claude Julien switched goalies because Rask was fighting the puck. That was particularly the case on Stafford's first goal, which cut the Bruins lead to 4-3 in the final minute of the first period.
Catching Rask cheating off the right post, Stafford attempted to squeeze in a shot from a bad angle. Rask caught a piece of it and had dropped down to cover the puck, as Stafford got his stick in to shove the puck over the line.
Thomas had a tough night, too. Stafford forced overtime by digging the puck out of a scrum in front of the Bruins net, and lifted it over Thomas, who was attempting to scramble back into position.
"It's not an easy game to watch from behind the bench," Julien said. "At the end, we didn't handle that well at all."
The Sabres were forced in a position to have to rally again after they squandered a 5-4 lead entering the third period. Seguin and Kampfer scored 3:58 apart.
"To come out in the third too passive, there's still areas we need to be better," Vanek said. "But at the same time, I think we showed some guts to come back and keep fighting."
NOTES: The Sabres inducted forward Alexander Mogilny and Hall of Fame hockey writer Jim Kelley, who died last month, into the team's Hall of Fame. Mogilny had 211 goals and 444 points in 381 games in Buffalo. His 76 goals in 1992-93 remain a franchise single-season record. Kelley covered the Sabres for more than 20 years with The Buffalo News. ... Sabres C Tim Connolly had two assists in playing his first game after missing four with a broken nose. ... The Bruins will complete a season-high, five-game road trip at Toronto on Monday. ... Boston had not lost this season when leading by two goals, and dropped to 19-1-2 after scoring first.