Elmer Soderblom had the go-ahead goal for the Red Wings, who trailed 2-1 entering the final period. Pius Suter and Michael Rasmussen also scored, while Magnus Hellberg made 20 saves.
Detroit erased a four-goal deficit against Pittsburgh two games earlier and pulled out an overtime victory.
''I think it's positive we can score in bunches,'' Rasmussen said. ''I don't think we want to be down like that like we have been for the past few games. But it's always encouraging when you can score a few in a couple minutes there. I think we've just got to start a little better.''
Austin Watson and Claude Giroux scored for the Senators, and Cam Talbot stopped 21 shots.
Drake Batherson extended his point streak to 13 games for Ottawa with a first-period assist. Alex DeBrincat, who also had an assist in the first, has at least one point in 13 of the last 14 games.
The Senators grabbed a 2-0 lead in the opening period.
Watson scored his third goal on a wrist shot from the slot. Giroux got his 15th when he flipped a backhand over Hellberg's right shoulder.
Detroit scored the only goal of the second when Suter converted a behind-the-net feed from Raymond for his fifth goal.
Raymond wound up serving six penalty minutes later in the period but Ottawa was unable to extend its lead. Those penalty kills set the stage for Detroit's third-period rally.
''It was a tough spot. We've got our PK to thank a lot for that,'' Raymond said. ''It's not fun to sit in that box, but we built momentum from that. Obviously, we don't want to get in those situations but it felt real good coming back and winning it.''
The Red Wings took the lead with three goals in the first 3:13 of the third.
''I don't know if it was the energy in the building or if we just weren't confident in what we were doing, but they took it to us and we just weren't able to stop them,'' Watson said.
Raymond scored his ninth goal by redirecting Olli Maatta's shot from the point. Soderblom scored his fifth with a drive from the edge of the left circle. Talbot then committed a turnover while trying to pass the puck from behind the net. Rasmussen turned the giveaway into his seventh goal and a 4-2 Detroit lead.
''It's tough to fight through that (first period) and I think our guys felt a little sorry for themselves,'' Red Wings coach Derek Lalonde said. ''We probably lost some momentum after those goals but credit to our guys, they pushed back in the second and in the third. A complete comeback team effort.''
Ottawa coach D.J. Smith felt his team simply got outplayed.
''We just weren't good enough,'' he said. ''We got away from the game plan when we got the 2-0 lead, but that happens. You have to be able to grab the game and hold the momentum. They came out in the third period ready to make a push and we weren't ready for that push.''
NOTES: Ottawa won the previous five meetings. ... DeBrincat has 27 points in 18 career games against Detroit, while Giroux has 31 points in 31 games. ... Red Wings G Ville Husso was inactive for the second straight game with an illness. ... It was the 66th time the Red Wings hosted a New Year's Eve game. They have won 34 of them.
Senators: Host the Buffalo Sabres on Sunday.
Red Wings: Host the New Jersey Devils on Wednesday.
AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.