Paul Gaustad took matters into his own hands, and kept the Sabres alive.
Gaustad's goal assured the Sabres of a crucial standings point.
"It was great to get that goal," Sabres goalie Ryan Miller said. "It was about the time I was getting a little antsy, like, 'OK, we better do something.' It's a good feeling and it keeps us alive."
Roy forced a forehand into the net as Senators goalie Martin Gerber -- who was beaten by Pominville's shot to the top-right corner on the Sabres' second attempt -- was unable to keep the puck out as he slid into the back of the net.
"I wanted to make a stutter and stop for a little bit and strip his gap a little and I just tried to make a move to my forehand and it happened to go in off his skate," Roy said.
"We deserved it," Afinogenov said. "We just work, work, work, work, work, work, and finally it went in. We got our bounce. It's not luck, we just worked."
The Sabres are three points behind ninth-place Washington, and five back of Philadelphia and Boston -- currently tied for seventh -- for a berth in the playoffs.
"I thought we deserved to win it from start to finish," Sabres coach Lindy Ruff said. "We didn't give up a lot, we did a pretty good job against their top line, and I think when you work that hard and put the work in -- we got rewarded."
Mike Fisher gave Ottawa a 3-2 lead early in the third with his second goal of the game.
Spezza also scored for the Senators, who moved into fourth place in the Eastern Conference with 92 points, one ahead of the New York Rangers and New Jersey.
Fisher scored his 22nd goal 4:17 into the second to tie it at 2 before adding his second of the game -- his 23rd -- during a 4-on-4 situation 3:58 into the third.
"It's disappointing to lose like that," Fisher said. "With a minute and a half left, you know we've got to bear down and be a little bit better but that's a team that's fighting for their lives and playing pretty hard. We know we've got to overall be a little bit smarter and better in the defensive zone."
Gerber made 37 saves in his 13th consecutive start for Ottawa.
"It was a lucky break for them," Gerber said of Roy's shootout goal. "He made a good move but it hit the post, and it hit my pad and then it goes in."
Miller stopped 25 shots, though he had little chance on Fisher's second goal.
With each team playing a man short, Vermette took a pass from defenseman Andrej Meszaros at the right point and drove the left side.
Vermette fed a centering pass to Fisher, who redirected the puck past Miller into the right side of the net.
Ottawa's Cory Stillman left the game with what the team described as a lower-body injury. He did not return.
Spezza opened the scoring with his 33rd goal 7:35 in. The playmaking Ottawa center drove the right wing on a 2-on-1 and faked a shot, holding the puck before beating Miller with a tight-angle shot between the pads.
Afinogenov tied it 55 seconds later when he beat Gerber for his 10th goal at 8:30.
Roy got his second straight assist when Hecht scored a power-play goal at 12:45 to put the Sabres up 2-1.
Two of the Sabres' five remaining games are against the Bruins. ... Senators D Wade Redden missed his second game in a row because of a leg injury. D Brian Lee, who made his NHL debut Tuesday, played his second straight game.