Buffalo, battling for the eighth and final playoff spot in the Eastern Conference, trailed 3-0 at the end of the first period and 4-2 early in the final frame. The Sabres kept their post-season hopes alive by scoring the final three goals, including Jordan Leopold's game-tying tally during a wild scrum in front of the net with 1:53 left in regulation.
Buffalo was on a 4-on-3 power play in extra time when Roy scored the winner on the rebound of a Thomas Vanek shot.
Ryan Miller recorded 20 stops as the Sabres pulled even with the idle Washington Capitals for the eighth spot with two games remaining.
Tyler Bozak finished with two goals and an assist and Ben Scrivens turned aside 39-of-45 shots for the Maple Leafs.