Tyler Ennis scored in the third round of the 3.
Ennis, Marcus Foligno and Nathan Gerbe all scored in regulation for the Sabres, who sit two points back of Washington for the final playoff spot in the Eastern Conference.
Ryan Miller made 33 saves for Buffalo, which improved to 8-2-2 over its last 12 games.
Erik Karlsson scored twice for the Senators, who are two points back of Boston for first in the Northeast Division. Erik Condra also lit the lamp.
Ben Bishop turned aside 38-of-41 shots for Ottawa, which had a two-game winning streak snapped.
The Senators scored a short-handed goal at the 8:27 mark of the first period. Condra stole the puck away from Tyler Myers at the blue line and raced the other way on a breakaway. He beat Miller with a wrister to make it 1-0.
Gerbe tied the game on a shot from the high slot at the 9:28 mark of the middle stanza.
Ottawa took the lead back just over two minutes later. Karlsson gathered a loose puck below the goal line and threw a shot on net, which hit off the back of Miller and went in.
Ennis put home a rebound with 17.3 seconds left to make it 2-2.
After the Sabres turned the puck over in their own zone, Karlsson beat Miller with a shot from the high slot to give the home team a 3-2 lead at the 7:14 mark of the third.
But Foligno, who was recalled from Rochester (AHL) on Friday, tied the game with 5:54 to go. Foligno threw the puck on net from the left corner and it deflected off Daniel Alfredsson and over Bishop's shoulder. It was Foligno's first NHL goal in his second game.
Buffalo had a great chance to win the game late in overtime, when Karlsson was called for tripping and unsportsmanlike conduct. Bishop made four saves in OT to send the contest into a shootout.
Jason Pominville beat Bishop glove side to give the Sabres a 1-0 lead in the shootout. Alfredsson kept Ottawa alive by starting the next round with a score. Ennis, though, won the game for the visitors with a nice move and wrister.
The Senators and Sabres split six meetings this season...Buffalo was without forward Thomas Vanek (upper body) and defenseman Andrej Sekera (flu-like symptoms)...The Sabres went 0-for-3 on the power play, while the Senators went 0-for-1 on the man advantage.