Jack Studnicka, Brock Boeser, Ilya Mikheyev and Elias Pettersson also scored for Vancouver, and Connor Garland had two assists. Spencer Martin had 37 saves.
''It wasn't maybe the prettiest win, but we've had a lot of good games where we haven't won this year,'' Horvat said. ''We owe a lot of thanks to our goaltender tonight, for sure, especially in the first couple of periods, keeping us in it.''
Tim Stutzle, Claude Giroux, Drake Batherson and Travis Hamonic scored for Ottawa, which has lost six straight. Cam Talbot had 22 saves.
''We just didn't get the job done,'' Senators coach DJ Smith said. ''We looked very confident in the second period. We looked very confident in the first period, but then when you get into the third period we just didn't make the plays we needed to make.''
Horvat scored from the top of the crease 1:16 into the third period to give the Canucks a 3-2 lead, and Boeser scored on the power play at 8:18 for a two-goal lead.
Stutzle got a power-play goal with 5:57 remaining to pull the Senators within one, a goal at 4-3, but Studnicka capitalized on an Ottawa turnover in its end to push the lead back two two at 5-3 with 5:01 left.
Giroux scored another power-play goal for the Senators with 2:51 to go, but Pettersson had an empty-netter with 45 seconds remaining to cap the scoring.
''We're just trying to be mentally tough,'' Horvat said. ''It's been a mental grind for a lot of this year and a lot of mental lapses by us. I thought we stayed mentally strong tonight.''
The Senators got on the scoreboard first just 50 seconds into the game when Alex DeBrincat beat out an icing call, got the puck behind the net and found Batherson alone.
Horvat tied it with 53 seconds left in the period, but Hamonic beat Martin with a point shot just 16 seconds later to put the Senators back ahead.
''We have to work for our breaks, work for our chances and bear down. That's all we can do,'' Hamonic said. ''We're scoring some goals, we just have to buckle down on our opportunities, not just offensively but defensively as well when we get the chance to make the right play.''
The Senators put in a dominating performance in the second period that included a 19-8 advantage in shots, but the Canucks got the only goal of the period.
''We probably could have scored four or five in the second and we didn't,'' Smith said. ''We have to stick to it if you want to get out of this.''
Mikheyev tied it 2-2 with 6:10 remaining as he got a pass from Quinn Hughes and beat Talbot in tight.
The Senators recalled D Jacob Bernard-Docker from Belleville of the AHL and and he made his season debut.
Canucks: At Montreal on Wednesday night in the second of a five-game trip.
Senators: At New Jersey on Thursday night to open a two-game trip.
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.