In a coaching career spanning 47 years, Gailey began his NFL career as part of Dan Reeves' coaching staff on the Denver Broncos from 1985 to 1990, appearing in Super Bowls XXI, XXII, and XXIV with the Broncos. Gailey was on the Pittsburgh Steelers staff from 1994 to 1997 when the Steelers won four straight AFC Central titles and coached in one Super Bowl (XXX). He held his first professional head coach position in 1998, when he became the new head coach of the Dallas Cowboys, and led the Cowboys to playoff appearances in each of his 2 seasons in Dallas. Gailey served as offensive coordinator for the Miami Dolphins in 2000 and 2001, when the Dolphins posted consecutive 11–5 records, and was part of the 2000 Dolphins squad which was the last time the team had won a playoff game. Gailey served as the offensive coordinator for the Kansas City Chiefs in 2008 and three games of the 2009 preseason. In 2010, he was hired as the new head coach of the Buffalo Bills, where he coached until 2012. 3 years after his firing from the Bills, he served as the offensive coordinator for the New York Jets from 2015 to 2016. In 2020, Gailey came out of retirement to again serve as the offensive coordinator for the Miami Dolphins, where he would last for only a season before resigning on January 6, 2021.