Ehlers put the Jets up 2-1 at 10:50 of the second period after taking a pass from Kyle Connor on a 2-on-1.
William Nylander tied it 2-2 at 6:29 of the third period when he took a pass from John Tavares and shot from the right face-off dot.
"It was a terrific pass from John, I just had an open net and just had to put it in," Nylander said. "I had a couple open nets tonight so at least I scored one."
Hellebuyck made a glove save on Nylander, who was alone in the slot after taking a pass from Tavares at 12:20 of the second period. He stopped Pierre Engvall on a shorthanded breakaway at 15:01 before saving a one-timer from Nylander in the slot at 15:46 to keep the Jets in front.
"Me personally, I thought I stole a lot of goals tonight, so I'm happy with my performance and I'm just looking forward to the next one," Hellebuyck said. "They're a good team over there and we knew they were going to come with their best game. It was a small victory getting the game to overtime, but in this league, we want to win, so we're not cherishing a point but it's better than not getting one."
Matthews credited Hellebuyck for making several difficult saves.
"Hellebuyck played really well, you have to tip your hat to him," Matthews said. "He made some incredible saves. We had some really good looks and he came up big, but I'm proud of the way everybody stuck with it."
Pierre-Luc Dubois intercepted Travis Dermott's pass in the neutral zone before passing to Ehlers, who shot over Andersen's glove in the slot for a 1-0 lead at 16:19 of the first period. Marner tied it 1-1 at 3:14 of the second period.
"I didn't hate our game; I thought we were playing pretty well," Maple Leafs coach Sheldon Keefe said. "We gave them a couple great opportunities to score and they did. We don't want to give them those chances, but aside from that, I didn't dislike much about our game. The difference was we had missed a lot of chances that hadn't gone in and we just had to stay with it and have confidence we'd be able to score enough to win but not give them the next one."
NOTE:The Maple Leafs became the first team in the NHL to reach 40 points this season. It's the first time Toronto has done that since the 1993-94 season.