Zenit twice took the lead, only for Spartak to equalise on both occasions, Kim Kallstrom and Yura Movsisyan levelling after strikes from Alexander Kerzhakov and Hulk respectively.
However, a late surge from Luciano Spalletti's men ensured the points, as Oleg Shatov and Danny both scored in the final 10 minutes.
Lokomotiv Moscow move into second place behind Zenit as a result of Spartak's defeat, although they were unable to take all three points from their game with Tom Tomsk, and were left to settle for a 0-0 draw on Monday.
Struggling Terek Grozny earned their first win of the campaign as they stunned CSKA Moscow 2-0, strikers Kanu and Igor Lebendenko netting to seal the victory.
Meanwhile, Rubin Kazan's poor start to the season continued, Kurban Berdyev's men extending their winless run to four games, with Mauricio Pereyra's early strike enough to seal a 1-0 win for Krasnodar on Sunday.
A late Pavel Solomatin goal gave Anzhi Makhachkala a 2-2 draw with Amkar Perm, the striker scoring in the dying embers to earn a share of the spoils.
Amkar - who had right-back Andrey Semenov sent-off in the second half - looked to be on their way to victory after they had cancelled out Alan Gatagov's penalty with goals from Maxim Kanunnikov and Igor Picusceac, before Solomatin struck in the 90th minute.
Dinamo Moscow eased to a 2-0 win over Krylya Sovetov, Aleksandr Kokorin and Yuri Zhirkov finding the net as the capital club clinched only their fourth win of the campaign.
Elsewhere, Volga beat Kuban Krasnodar 1-0 and Rostov drew 1-1 with Ural.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.