After finishing his PhD, Gayen became a research associate at the City University of New York from 1984 until 1988. He then moved to the Stevens Institute of Technology as an assistant professor, where he remained until 1995. In 1995, he returned to the City College of New York, where he was promoted through the ranks, reaching the title of full professor of physics in 2007. He served as chair of the CUNY department of physics from 2016 until 2019.