Jason Spezza scored in regulation for Toronto, which got 24 saves from Michael Hutchinson.
Mark Borowiecki scored for Ottawa. Craig Anderson stopped 34 shots.
''We stayed with it,'' Leafs head coach Sheldon Keefe said. ''We knew it was going to be a really hard game, and it was.''
After the Leafs killed off a penalty to Tyson Barrie in the extra period, during which Thomas Chabot hit the post behind Hutchinson, Toronto got a power play of its own when Mike Reilly went off for interference. Marner scored his 14th goal of the season on a one-timer off a feed from William Nylander.
''I don't think anyone really thinks I'm going to shoot that,'' Marner said. ''Luckily it went in.''
Tied 1-1 through 40 minutes, Anderson robbed the Nylander, who entered with goals in five straight contests, 36 seconds into the third period on a power play when he reached back with his glove and denied the winger from the edge of the crease.
Anthony Duclair had an opportunity at the other end that Hutchinson turned aside.
Anderson then denied Juston Holl and Auston Matthews on chances in close as Toronto started to come in waves before John Tavares hit the post and Alexander Kerfoot was stopped off the rush.
Zach Hyman then had the puck bounce over his stick in the final seconds of regulation with Anderson way out of position.
After the Leafs had a couple of good looks in front of Anderson early in the second, Borowiecki scored his seventh at 6:08 on a shot through traffic to give Ottawa a 1-0 lead.
Hutchinson, who got the start in place of Frederik Andersen with Toronto playing five times in eight nights, was forced to make big saves on Chris Tierney, Jean-Gabriel Pageau and Brady Tkachuk in quick succession before Spezza struck against his former team on the power play.
''It was a little extra added atmosphere,'' Hutchinson said. ''It's also cool having Spezza on our side of the Battle of Ontario now. I grew up watching him on the other side of it.
''To be a part of it was pretty cool.''
The 36-year-old took a feed from rookie defenseman Rasmus Sandin and blasted a slap shot that beat Anderson high on the short side for his eighth goal in 40 games.
Spezza, who was selected second overall by Ottawa at the 2001 NHL draft and played parts of 11 seasons with Senators, faced his previous team for the first time.
Spezza tried to downplay his ties to the Toronto-Ottawa rivalry.
''It's a huge honor for me to play here for the Leafs,'' Spezza said. ''This Battle of Ontario's ingrained in me. I've been on the other side and used to like coming in here and trying to win games.
''But I'm really not trying to focus on all the nostalgia.''
Toronto had Saturday's first chance less than an minute in when Anderson stopped Nylander on a partial breakaway.
Ottawa pushed back with a couple of opportunities, including a Duclair effort that just went wide as he was being hassled by a defender.
Spezza nearly scored on an end-to-end rush later in the period.
NOTES: Toronto scratched winger Kasperi Kapanen - the move wasn't injury-related and he watched from the Scotiabank Arena press box - with Dmytro Timashov taking his place in the lineup. Leafs head coach Sheldon Keefe was expected to update Kapanen's status. ... Ottawa has four players on its roster that suited up for Toronto last season in defensemen Ron Hainsey and Nikita Zaitsev, and forwards Connor Brown and Tyler Ennis. Senators rookie head coach D.J. Smith, meanwhile, was an assistant under Babcock from 2015-19 before getting hired in May. ... Leafs blue-liner and Ottawa-native Cody Ceci, who was acquired in the six-player trade that included Zaitsev and Brown on July 1, played for the second time against his hometown club. ... Toronto defenseman Travis Dermott (illness) didn't dress. Martin Marcinin took his spot alongside Tyson Barrie. ... The teams play twice more this season in Ottawa - Feb. 15 and March 28.
Senators: Host Anaheim on Tuesday.
Maple Leafs: Host Florida on Monday.
More AP NHL: www.apnews.com/NHL and www.twitter.com/AP-Sports
Copyright 2020 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.