TORONTO -- The Toronto Maple Leafs won by shootout for the second game in a row, surviving a close call in overtime to edge the Vancouver Canucks 3-2 Saturday night.

Canucks rookie star Brock Boeser appeared to have won the game with a blistering shot 45 seconds into overtime but replays showed the puck went off one post and then another without entering the goal.

The Leafs then had a man-advantage with Boeser off for slashing but failed to convert.

Auston Matthews and Tyler Bozak scored for Toronto (25-16-2) in the shootout. Sam Gagner scored for Vancouver (16-19-6).

Goals by Boeser in the second period and Gagner in the third gave the Canucks a 2-0 lead.

Toronto finally beat Jacob Markstrom at 8:23 of the third when Matthews tipped in a fine pass from Zach Hyman for his 19th of the season. And Bozak tied it up at 12:37, knocking in his own rebound after a long stretch pass from Morgan Rielly sent him in alone.

Defenceman Travis Dermott, in his NHL debut, also picked up an assist on the tying goal before an Air Canada Centre crowd of 19,301 that braved frigid conditions (-18 C, -27 with the wind chill) outside.

The Canucks outshot Toronto 34-31 in regulation time. The teams were tied at 36-36 after OT.

Vancouver's injury woes continued when defenceman Chris Tanev, who had just returned to action from a groin injury, left the game in the first period after taking a deflected shot to the face on his fourth shift that left a pool of blood and several teeth on the ice.

Defensive partner Michael Del Zotto retrieved the teeth.

The Canucks had last won at the ACC on Dec. 17, 2011, and came into the game 1-4-0 in their past five visits to Toronto.

Vancouver arrived on a two-game losing streak, having won just one of its last seven games (1-5-1) and three of its last 12 (2-9-1). The Canucks were outscored 55-28 over those 12 games and had been restricted to one goal or fewer in six of the 12.

Toronto had snapped a three-game slide with a 3-2 shootout win Thursday over San Jose. But going into Saturday night's contest, the Leafs had only won four of their last 11 (4-6-1).

Vancouver had been idle since a 5-0 loss to Anaheim on Tuesday that saw Anders Nilsson pulled in the third period. Markstrom started Saturday and, barring a bizarre goal that was negated by a coach's challenge, was sharp.

The Leafs had some excellent early scoring chances but were unable to beat Markstrom. At the other end, Jake Virtanen hit the post.

Canucks defenceman Erik Gudbranson fell heavily into the boards on an icing call early in the second period. But he kept playing as Vancouver outshot Toronto 9-2 to open the period.

Boeser put the visitors ahead at 2:59, beating Frederik Andersen stick-side with a rocket-like snap shot off a Thomas Vanek feed. Boeser had kept the attack alive, knocking down a Connor Carrick clearing attempt with his stick for his ninth point (five goals, four assists) in seven games.

The Leafs seemed to have tied it up at 8:26 on essentially an own goal by Markstrom, who fumbled a Rielly lob-knuckleball of a shot into the net when it fell out of his glove. But Vancouver successfully challenged the play was offside, with replays showing the puck bounced off Rielly's skate across the blue line with a Leaf player in the zone.

Gagner made it 2-0 at 6:34 of the third, taking advantage of 1:22 of a 5-on-3 advantage when Matt Martin and Roman Polak received minors. Gagner beat Andersen with a screen shot from the face-off circle with 17 seconds remaining on the first penalty.

The goal snapped an 0 for 15 power-play drought for the Canucks.

Boeser showed his skills prior to the game when the soccer ball some of the Canucks were playing with in an arena corridor landed high up on a heating duct. The star rookie climbed atop a garbage bin and used a stick to retrieve the ball.

Saturday's game was the first of a lengthy road trip that will also take the Canucks to Montreal, Washington, Columbus, Minnesota, Edmonton and Winnipeg.

The 21-year-old Dermott, a second-round draft pick in 2015 who had been with the AHL Marlies, came in for Andreas Borgman and acquitted himself well.

"Borgman did nothing wrong. We're going to have a look at Dermott," coach Mike Babcock said after the morning skate.

Toronto, in the middle of a six-game homestand, hosts Columbus on Monday.