Adrian Kempe also had a goal, Pheonix Copley make 26 saves, and the Kings won their third straight game while improving to 10-2-1 in their past 13.
''When you're not playing your best, it's nice to find a way to win,'' Kings coach Todd McLellan said. ''I think a couple years ago we wouldn't have won that game when we're not playing our best. ... Now we can truly evaluate it and admit when we're not the best, and try and fix it.''
Timo Meier had a goal and an assist, Alexander Barabanov and Nick Bonino also scored, but the Sharks couldn't sweep back-to-back games after winning at Arizona on Tuesday. James Reimer had 33 saves.
''We're there every game, and just can't get wins,'' Bonino said. ''It's frustrating for everyone. We're trying everything in practice and video, competing, and it's just not going our way right now.''
Vilardi alertly redirected Sean Durzi's shot from the left point to put the Kings ahead 3-2 with 7:20 to go in the third period. Vilardi reached the 30-point milestone for the first time, but McLellan has been even more impressed with his other contributions to the cause.
''If Gabe didn't score for four or five games a couple years ago, I'm not sure that we would appreciate his game that much,'' McLellan said. ''So I'm really happy that Gabe's scoring, but I'm extremely happy that Gabe's become a complete player. And I think he would tell you that, too.''
Doughty finished off an odd-man rush with 6:27 left for the 4-2 advantage before Barabanov scored with 2:06 remaining, but the Sharks couldn't come up with another goal to snatch a point.
''We had the foot down a few times, and we kind of let off a little bit, and they kept clawing their way back in. But there was a couple good shifts we put forward there, and some real nice plays on those goals to get us the lead, and that's the way we got to play the game,'' Byfield said.
Meier tied it 2-all with 9:49 remaining in the third. He beat Copley on a wrist shot from the left circle on the power play for his 24th goal.
''There's a lot of level of frustration because we feel like we've played better, but our record is what it is,'' Sharks coach David Quinn said. ''I'm just proud of the way we competed and didn't give up. Even at 4-2, we kept playing and had chances to tie.''
MAKE IT COUNT
Doughty ended up with his 29th career game-winning goal, tying current Kings general manager Rob Blake for most in franchise history by a defenseman. That means 21.5% of Doughty's 135 career goals have secured a victory for the Kings.
Byfield put the Kings up 2-1 at 6:58 of the second period, scoring his first goal in 16 games this season by chopping down Mikey Anderson's shot from the point.
''The chances are there, it's just kind of bearing down,'' said Byfield, who also set up Kempe's opener 5:59 into the game, building up speed from the neutral zone to get behind the net before making an alert pass. ''I've been playing hard, just trying to get a little more physical. I think that's been in my game lately.''
Sharks D Scott Harrington missed the final two periods because of an upper-body injury. He apparently sustained the injury in the closing seconds of the first. . Kings F Viktor Arvidsson did not play because of a non-COVID illness.
Sharks: Host Edmonton on Friday night.
Kings: Host New Jersey on Saturday night.
AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.