Richards also had an assist in the victory, which pulled Los Angeles even with Phoenix in the scrap for the eighth playoff berth in the Western Conference.
Anze Kopitar had a goal and an assist for the Kings, who won their fifth in a row. Jonathan Quick made 20 saves.
The Sharks ended the night two points shy of the final playoff spot on the Western Conference.
Richards gave the Kings a 1-0 lead at 15:26 of the first period, but Havlat came back less than 20 seconds later with a game-tying power-play goal.
Alec Martinez put Los Angeles ahead 2-1 in the second period and the Kings iced the win with third-period goals by Kopitar, Dustin Penner and Justin Carter, who scored into an empty net with 16 seconds left to play.
Swim Week Miami Beach 2014 [PHOTOS]