The lead changed hands three times and regulation finally ended in a 5-5 tie after the Sharks' Tommy Wingels scored with 5:10 to go in the third period.
St. Louis gave the Lightning a brief 5-4 lead 8:01 into the third and he won it with his 18th of the season.
Steven Stamkos also scored twice for Tampa Bay, running his league-leading goal total to 39. He has a seven-goal lead over Pittsburgh's Evgeni Malkin in his bid to win the league's scoring title for the second time in three seasons.
Wisconsin business offering 'therapeutic cuddling' forced to close
N.J. man wakes up from 10-hour sleep with knife in back