Williams and Anze Kopitar each had two goals and an assist, and Jonathan Quick made 25 saves as the Kings became just the ninth team in NHL history to force a seventh game after losing the first three.
Stalock stopped 26 shots in his first NHL playoff start, and James Sheppard scored for the spiraling Sharks.
Just three teams in NHL history have rallied from an 0-3 deficit to win a series.
Los Angeles could join them in Game 7 in San Jose on Wednesday.
I think everyone left it out there. Every game this season, regular season and playoffs, we played as hard as we could. We're not out of the playoffs right now because of lack of effort, and that's all that we can ask of each other.
— Predators defenseman Seth Jones after Nashville was eliminated by Chicago in Game 6 on Saturday