Jonathan Quick made 25 saves for the Kings, who moved one victory closer to their second Stanley Cup title in three years after a hair-raising opener.
Game 2 is Saturday at Staples Center.
Kyle Clifford had a goal and an assist for Los Angeles, and Drew Doughty scored the tying goal in the second period as the Kings overcame yet another early deficit in a postseason full of comebacks.
The Kings hadn't won an overtime playoff game at home since May 6, 2001. Williams attributed the win to " resilience and believing. Certainly it was not the start we wanted, but we got the result we wanted."
Benoit Pouliot scored on a breakaway and Carl Hagelin got a short-handed goal in the first period, but the Rangers spent much of the final two periods on their heels. Lundqvist had several outstanding saves as the Swedish star began his attempt to win his first Stanley Cup, but had no chance on Williams' winner.
Los Angeles outshot New York 20-3 in the third period, becoming the first team to get 20 shots in a finals period in 16 years. The Kings also got a power play with 1:36 left, setting up a wild finish to regulation.
Moments after Hagelin was denied by Quick on yet another short-handed breakaway, Jeff Carter was stopped agonizingly short of a wraparound goal by Lundqvist, sending the Kings to their third straight overtime playoff game.
The tension-filled opener was a fitting start to the finals for two teams that traversed perilous paths to the first New York-L.A. championship playoff meeting since the Yankees-Dodgers World Series in 1981.
The Kings and the Rangers played a combined 41 games in the first three rounds - just one fewer than the maximum - to emerge from the middle of the playoff pack.
The series is big news in the nation's two biggest cities: Staples Center was packed for the opener with roaring Kings fans still not quite accustomed to their club's recent success. Meanwhile, thousands of New Yorkers packed Bryant Park to watch on video boards.
The Kings and Rangers hadn't met in seven months, but New York's speed quickly caused problems for Los Angeles, leading to an early two-goal advantage.
Pouliot scored the first goal of the series on a breakaway, stealing the puck from Doughty and skating past a stumbling Jake Muzzin. The Rangers' small contingent of fans roared again 2:42 later when Hagelin's breakaway shot was kicked in by Slava Voynov, who hadn't been able to keep up with Hagelin out of the New York zone.
Los Angeles answered late in the period when Carter passed from behind the net to Clifford, who banged in a sharp-angled shot for his first playoff goal since April 23, 2011. The grinding forward had played 37 straight postseason games without a goal.
Doughty tied it for the Kings with a beautiful move, toe-dragging around Derek Dorsett and firing a wrist shot past Lundqvist for his fourth goal in six games.
Los Angeles had the first 14 shots in the third period, but Game 1 of the Stanley Cup finals went to overtime for the third straight season.