Erik Karlsson gave the Sharks a 4-3 lead at 10:41 of the third period with a shot from the right face-off circle. Logan Couture scored into an empty net for the 5-3 final.
"We found a way to win this game and it definitely feels good, especially [since] it would have been easy to quit at 3-0," Sharks forward Timo Meier said. "But we put our heads in there and then went to work, so I think that one feels really good."
Karlsson also had three assists, and Nick Bonino had a goal and an assist for the Sharks (14-23-9), who had lost three straight. James Reimer made 33 saves for his 200th NHL win.
"When you get deep in the season, it's easy to kind of look at the situation and just quit and we have done anything but that," Sharks coach David Quinn said. "I've said this all along, I love coaching our group. It's a great group to coach. They come to work every day, they bounce back after tough nights, which we've done. And I just can't say enough about our group. I'm really happy for them."