The Canucks trailed 2-0 after two periods, but Loui Eriksson and Josh Leivo scored 1:52 apart early in the third, and Edler won it with a wrist shot under Frederik Andersen's glove from the top of the left face-off circle.
"That one feels good," Canucks center Bo Horvat said. "The relentlessness and the character in this room that we battled back against a team like that, it's not easy to do and I thought we played a heck of a 60 minutes tonight."
WATCH: [All Maple Leafs vs. Canucks highlights]
It was Toronto's first loss this season when leading after two periods (32-0-1).
"Just little mistakes that we've got to fix," said Maple Leafs forward Mitchell Marner, who had an assist to extend his point streak to five games (three goals, eight assists). "Going forward, we're going to look at it and be better at it. We've been pretty good all year at holding those leads, so we can't get frustrated about this one."
Adam Gaudette had two assists, and Jacob Markstrom made 28 saves for Vancouver (28-30-9), which ended a three-game losing streak and moved within seven points of the Minnesota Wild for the second wild card into the Stanley Cup Playoffs from the Western Conference.
"We need to get back on the win train again and just feel good about ourselves and have something to build on," Markstrom said. "It's a good bounce back game."
Ron Hainsey and Morgan Rielly scored 34 seconds apart in the second period, and Andersen made 28 saves for Toronto (41-21-5), which trails the Boston Bruins by two points for second place in the Atlantic Division.