Following his playing career, Gwynn was the baseball head coach at SDSU for 12 seasons, compiling a 363–363 record including three Mountain West Conference championships and three NCAA Tournament appearances. During his last season playing for the Padres in 2001, he lobbied for the coaching position after Jim Dietz announced he would step down after the 2002 season. In September 2001, Gwynn signed a three-year contract with his alma mater to be an unpaid volunteer coach for 2002 with a base salary of $100,000 starting in 2003. In the five-year period 2007–2011, the baseball team was penalized with a reduction in scholarships for failing to meet the NCAA's Academic Progress Rate. However, Gwynn's teams improved their academic performance for the five years ending in 2012. The Aztecs finished .500 or better in five of Gwynn's final seven seasons, and they qualified for the NCAA Tournament three times in his final six seasons. As the Aztecs' coach, Gwynn oversaw the development of future major leaguers such as Justin Masterson and Stephen Strasburg, the No. 1 overall draft pick in 2009.