Jed Ortmeyer scored what proved to the deciding goal in the second period for San Jose, which has picked up at least a point in its last 11 games.
St. Louis outshot the Sharks 39-17, but Nabokov was beaten only once, on a first-period goal by Jay McClement.
"They were all over us as far as the shots but Nabokov kept us in the game," Ortmeyer said.
Heatley and Ortmeyer scored 16 seconds apart in the second period to give San Jose a 2-1 lead.
Astronomers offer more expansive view of universe
McPhee, Cokas 'working on their marriage' after affair