After briefly teaching at Presidency College and Bengal College of Engineering & Technology, Gain got married to Krishna Chongdar, the daughter of a famous and wealthy Bengali businessman.
After returning to India, he started teaching at the Indian Statistical Institute as well as the University of Calcutta, and finally joined the Indian Institute of Technology Kharagpur, where he spent most of his remaining career.