Dutt, 56, who is out on a 30-day parole, has previously collaborated with Gupta for movies like "Kaante", "Zinda" and "Jung".
"Sanju was on my set today after nearly eight years... What a feeling! Time, life, destiny could not keep us apart. Cheers to that."
Calling him a "true superstar", Gupta said it was an emotional moment for the entire crew, including actress Aishwarya Rai Bachchan, when Dutt visited the set.
"Sanju was in town and I requested him to drop by our sets on his way back. He obliged and the whole crew went berserk. TRUE SUPERSTAR TRUE BRO.
The duo last worked together in the 2007 movie "Dus Kahaniyaan", an anthology of ten short films, where Gupta directed the "Vaastav" actor in a segment called "Rise & Fall".
The actor, who is serving a five-year jail term in the 1993 Mumbai blasts case at the Yerawada Central Jail, got parole after he cited his daughter's illness.