"The mindset for us tonight was the same throughout the game: That was to put the puck in good places, not to turn it over and feed their speed and their skill," San Jose coach Peter DeBoer said. "I thought we did a good job. We executed for 60 minutes.
"We got contributions from everybody. I think a little bit of fear in the belly from the highest scoring team in the League (entering Monday) coming in here maybe grabs your attention a little bit. I think our guys did a really good job of executing the game plan and sticking with it for 60 minutes."
Auston Matthews scored for the Maple Leafs, who lost for the fourth time in their past five games (1-4-0).
"We've been turning the puck over too much," Matthews said. "We stop that, we can win. I thought our work ethic and competing was much better tonight. We need to get out of the little funk we're in."
Martin Jones made 16 saves for the Sharks. Andersen had 36 for the Maple Leafs.
Matthews scored his ninth of the season at 12:14 of the first period to give Toronto a 1-0 lead. After Sharks defenseman Justin Braun blocked defenseman Nikita Zaitsev's shot, Matthews raced to the loose puck in the low slot and put a wrist shot past Jones.
Pavelski tied it 1-1 at 7:58 of the second period with his third goal. He redirected Heed's point shot past Andersen from the low slot.
"Just tried to get to the net," Pavelski said. "Puck found a way through. Made a tip, and it's good to see them go in, for sure."