Jonathan Quick made 25 saves as the defending Stanley Cup champions finished off this agonizingly even series with their 14th consecutive home victory over the past two months, including seven straight in the postseason.
The home team won all seven games in this thrilling all-California series, and the fifth-seeded Kings barely rode their home-ice advantage to victory in their first potential elimination game in the last two years.
Antti Niemi stopped 16 shots, and Dan Boyle scored early in the third period for the Sharks, who fell just short of their third trip to the conference finals in four years.
The Kings will face Chicago or Detroit when they attempt to reach the Stanley Cup finals for the third time. The Blackhawks host the Red Wings in Game 7 on Wednesday night.
Los Angeles has won eight straight home playoff games dating to last season's Stanley Cup clincher, but this one might have been the toughest. San Jose pressed the action throughout the third period after Williams' back-to-back goals put the Sharks in a mid-game hole, but Quick and the Kings' defense hung on for a win in Los Angeles' first Game 7 at home since 1989.
Williams scored on a power-play tap-in and a one-timer 2:57 apart early in the second, putting the Kings on top to stay. The veteran wing had an eight-game, goal-scoring drought, but the two-time Stanley Cup winner has a knack for Game 7 heroics, scoring nine points in his four career appearances in the decisive game.
Quick and Los Angeles' defense barely held off the Sharks in a frantic third period. Quick showed off his Conn Smythe Trophy form yet again, finishing the seven-game series by allowing just 10 goals.
This series was even from the start, with neither team able to take more than momentary control. The clubs were similarly equal in the regular season, when the Kings' 3-2 home victory over San Jose in the finale pushed fifth-seeded Los Angeles ahead of the Sharks. That eventually led to the Kings starting a playoff series at home for the first time since 1992.
Los Angeles opened with two home victories, stealing Game 2 with a pair of power-play goals in the final minutes for the only major comeback of the series. The Sharks responded with two solid 2-1 victories at home, keeping the Kings' offense punchless away from Staples Center.
Quick posted his second shutout of the series in Game 5, but San Jose forced a seventh game with another 2-1 victory at the Shark Tank last Sunday.
After a scoreless first period, featuring plenty of near-miss chances but just eight combined shots, the Sharks again came out solidly in the second period, holding the Kings without a shot for nearly 19 consecutive minutes.
But the Kings finally broke through after San Jose's Brent Burns took an interference penalty near Los Angeles' net. Williams got the puck to the post and hacked at it until it slid behind Niemi for his first goal since Game 4 of the first round.
Williams has been candid about his line's offensive struggles during this postseason, saying the Kings' top scorers had to get better for Los Angeles to advance.
He did it again 2:57 later, taking a cross-ice pass from Anze Kopitar and beating Niemi from short range with a one-timer. Williams had just two assists in the Kings' previous eight playoff games.
Niemi kept the Sharks in it with two stunning saves, preventing a natural hat trick by Williams several minutes before stopping Brad Richardson's one-timer. But Quick matched every save, and the Kings preserved their two-goal lead into the third.
Niemi made another enormous save during 4-on-4 play early in the third, stopping Jeff Carter on a breakaway. Boyle ended Quick's bid for his third shutout of the series with a long shot through traffic with 14:34 to play, giving the defenseman his third goal of the postseason.
Quick kept making astonishing saves until the final second, robbing Joe Pavelski on an open chance with his glove extended along the ice with 5:04 to play.
NOTES: San Jose kept its lineup from Game 6, while Los Angeles replaced fourth-liner Jordan Nolan with rookie Tyler Toffoli. Hobbling Sharks F Marty Havlat missed the final four games of the series and six of seven overall, playing only 4:52 in Game 3. ... Kings C Jarret Stoll missed his sixth straight game with an apparent concussion after an illegal hit in Game 1 by Sharks F Raffi Torres, who was suspended for the rest of the series. Stoll is Los Angeles' third-line center and a key contributor on penalty-killing and faceoffs. ... The Kings hadn't hosted a Game 7 since Wayne Gretzky had a hat trick to beat the Edmonton Oilers in 1989 at the Forum. ... David and Victoria Beckham attended the game with their children, sitting behind Tom Cruise. Beckham, who became a fervent Kings fan last season, wrapped up his soccer career just two days earlier in France, sitting out Paris Saint-Germain's final match.