Kyle Clifford also scored and Jonathan Quick made 31 saves as the Kings won their seventh straight game and dealt even more heartbreak to their Northern California rivals after knocking San Jose out of the playoffs the past two seasons.
Gaborik silenced an enthusiastic crowd of 70,205 just over 4 minutes into the third period when he took the puck away from Brent Burns in the neutral zone and skated in before beating Antti Niemi with a shot from the top of the circle.
The Sharks were unable to get the equalizer against Quick to send most of the fans in the third largest crowd ever to watch an NHL game home unhappy on a night meant to celebrate hockey's success in Northern California.
Burns scored the lone goal for the Sharks, who have lost six of eight games to put their 10-season streak of playoff appearances in jeopardy. Niemi made 27 saves.
PHOTOS: Levi's Stadium to host outdoor Sharks game
As much as this was a spectacle, it also was an important contest in the Western Conference playoff race. With the win, the Kings moved from out of playoff position into third place in the Pacific Division. Los Angeles is tied with Calgary and San Jose with 68 points but has played fewer games than both those teams.
The second outdoor game in California was full of pomp and circumstance with John Fogerty performing in the first intermission and Melissa Etheridge in the second.
The ice rink was surrounded by designs of the topography or Northern California with designs of mountains, plants, hills and bodies of water including numerous shark fins for a special touch.
The ice was a bit choppier than the usual indoor variety is, forcing both teams to simplify their games a bit. But the game-time temperature was 57 degrees, nearly twice the average of the previous 14 outdoor games.
The Kings did the better job of dealing with the surroundings early and controlled the play for most of the first period, getting the first goal less than 3 minutes in when Clifford deflected a point shot by Jake Muzzin past Niemi.
The Sharks found their legs late in the period and tied it with just over a minute left when Burns beat Quick with a wrist shot from the boards after a faceoff win by Tommy Wingels. Quick got a piece of the shot but it wasn't enough as he appeared to have trouble seeing the puck.
The Sharks had plenty of chances in the second period but couldn't get anything past Quick. Couture had two of the best opportunities but had a shot blocked by Matt Greene's stick with an open net on the power play, and then hit the post in the closing minute.