Kevin Labanc and Evander Kane each had a goal and an assist for the Sharks, who have won six of eight overall to climb back into playoff contention.
San Jose is one point behind Arizona for the final postseason spot in the West after being eight points out to start the week.
''I think we're making strides,'' Sharks center Logan Couture said. ''We're in a spot right now with 19 games left to make a push and see where we end up, so I'm definitely happy with how we've played this last stretch.''
San Jose goalie Martin Jones stopped 35 shots after he made 30 saves in Friday night's 3-0 win at Los Angeles.
On the winning goal, Jonathan Quick was caught playing the puck out from behind his own net. John Leonard stole it and found Gambrell for an easy shot into an open net at 15:23.
''Johnny did all the work there, so I can't take too much credit,'' Gambrell said. ''He went end to end there and did all the work, and I was just there to tap it in so kudos to him.''
Quick made 20 saves.
Dustin Brown and Trevor Moore scored for the Kings, who have lost five of six.
''Lots of good things within the 60 minutes for us,'' Kings coach Todd McLellan said. ''Aggressive, played hard, checked well. A lot more traffic in and around the net, made the goaltender work a lot more. Short-handed goal. So there were a lot of positives in that game but it's only a moral victory. The two-point victories are what really counts at this time of the year and we've got to find a way to get a few more.''
Kane put the Sharks ahead 2-1 at 15:04 of the second, reaching around a sprawling Quick to score his 16th goal of the season into an open net.
Although Moore tied it at 19:06, tapping in his own rebound for his second short-handed goal this season, Sharks coach Bob Boughner said it was important to play the middle period on more even terms after being outshot 18-5 in the first.
''They were digging in and they had a hard, hard push when the puck dropped the beginning of the night, and I thought it took us a while to get our legs going,'' Boughner said. ''It's period like that, we come out 1-1 and we got outshot badly and are still in position to change the game, and we did that in the second period.''
The Sharks took a 1-0 lead at 4:37 of the first when Labanc shot through traffic in front of the net.
It was the fourth straight game in the series where the Kings allowed the opening goal, but they mounted a quick response. Brown redirected Kopitar's centering pass in to tie it at 1 at 6:55.
KING OF KINGS
Jones is 5-1-0 with a 2.37 goals-against average and .932 save percentage against the Kings this season, continuing his knack for haunting his former team. He is 18-5-3 in his career against them. ''We didn't play well in the first and he bailed us out and (was) a big reason why we were able to win that game,'' Couture said.
Moore is one of 12 players with multiple short-handed goals in the NHL, trailing only Columbus Blue Jackets forward Cam Atkinson's four. ''On the penalty kill, you know if you're on it, first and foremost, you got to get your clears and you got to be solid defensively. The offensive stuff is great when it happens. You only got to do it when it presents itself. You can't be forcing it, for sure,'' Moore said.
The Sharks played the final two periods with five defensemen after Marc-Edouard Vlasic left the game early because of an upper-body injury. Vlasic played 5:35 in the first but was not on the bench to start the second.
Kings defenseman Matt Roy did not play after being placed in COVID-19 protocol earlier Saturday.
Sharks: Host the Anaheim Ducks on Tuesday.
Kings: Host the Arizona Coyotes on Monday.
More AP NHL coverage: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.