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.
The winner of the California rivals' third playoff meeting in four years will face the top-seeded Anaheim Ducks in the second round.
Williams, a two-time Stanley Cup champion known for clutch playoff goals, also scored in the first period. He reached his stick between Stalock's pads and knocked home Robyn Regehr's shot for the go-ahead score, breaking open a tense game.
WILD 5, AVALANCHE 2
ST. PAUL, Minn. • Zach Parise scored early and late on tipped shots, and the Wild tacked on two empty-net goals for a victory that sent their first-round playoff series to a decisive Game 7.
Parise and Mikko Koivu each had two assists. The teams will meet again in Denver on Wednesday night, with the winner taking on the defending Stanley Cup champion Chicago Blackhawks in the Western Conference semifinals.
Parise scored just 49 seconds into the game and Mikael Granlund made it 2-0 later in the first period, but a costly turnover by Ryan Suter at the end of a failed 5-on-3 situation led to a short-handed goal for the Avalanche when Paul Stastny scored for the fourth time in the series.
Nick Holden got the tying goal in the second period for the Avalanche, but Parise stole the show for the home team. Parked in the crease with the season on the line, he took a shove in the back from goalie Semyon Varlamov and then outmuscled defenseman Erik Johnson for position on Koivu's shot from behind the circle with 6:29 left in the game.
PENGUINS 4, BLUE JACKETS 3
COLUMBUS, Ohio • Evgeni Malkin had a hat trick and the Penguins almost blew a four-goal lead before holding on for the clinching victory in Game 6 of their first-round playoff series.
The Blue Jackets scored three times in a 4:52 span in the third period to turn up the pressure on the Penguins.
Pittsburgh awaits the winner of the New York-Philadelphia series, with the Rangers leading 3-2 going into Tuesday night's Game 6.
Brandon Sutter also scored and Matt Niskanen had two assists as the Penguins became the first team in the series to score first and win but barely. Marc-Andre Fleury made 24 saves.
Fedor Tyutin, Artem Anisimov and Nick Foligno scored late to thrill a crowd of 19,189 who stood and roared for the final 4 minutes.
The Penguins were hard pressed to just fight off the upstart Blue Jackets after goalie Sergei Bobrovsky, who also had 24 saves, was pulled for an extra attacker with under 2 minutes left.