The Sharks halted a four-game losing streak and improved to 2-4-1 on a nine-game road trip that finishes with contests at Nashville and Minnesota.
Marleau scored 32 seconds into the game and added a power-play goal with 9:17 to go in the opening period. He has 25 goals for the season.
It remained a 2-0 contest until Jake Gardiner put a slap shot past Niemi 3:53 into the third period.
The Maple Leafs have just one win in their last eight outings. James Reimer stopped 23-of-25 shots for Toronto.