The hosts began brightly against the Russian giants and dominated proceedings in the first half although they could only register one shot on target, McGregor firing straight at Andrey Lunev.
Celtic could not find a goal by the break but continued to impress in the second half as Lunev was forced to parry Eboue Kouassi's 25-yard drive just after the hour.
The home contingent's frustrations were finally put to bed with just 12 minutes left to play as substitute Musonda crossed for McGregor to control on his chest and rifle beyond Lunev to send the crowd wild.
Roberto Mancini's charges set about trying to force an equaliser in the game and the tie but the Hoops held out to take a slender lead to the Krestovsky Stadium next Thursday.
CELTIC (3-5-1-1): De Vries; Lustig, Ajer, Simunovic; Tierney, Brown, Ntcham, Forrest, Kouassi (Musonda 73'); McGregor; Dembele (Edouard 84')
ZENIT ST PETERSBURG (4-3-3): Lunev; Smolnikov, Mevlja, Mammana, Criscito; Erokhin, Maksimovic, Kuzyaev (Kranevitter 62'); Rigoni (Driussi 62'), Kokorin, Zabolotny