Gainey attended the University of Southern Mississippi prior to moving to California. He worked as an undertaker's apprentice before he decided to study acting.
In the early 1970s, he attended the American Conservatory Theater in San Francisco along with Ken Hixon.
In 1981, he made his big-screen debut in the Steve Martin musical Pennies from Heaven. Since the early 1980s he has been in over 50 movies and made for TV movies, including Breakdown, Two Idiots in Hollywood, Con Air, The Mighty Ducks, Are We There Yet, Terminator 3, Sideways, and 2005's The Dukes of Hazzard.
Gainey was one of the stars of the short-lived television series Against the Law. He has guest starred on over 40 television shows, including The Dukes of Hazzard, Knight Rider, Designing Women, The Adventures of Brisco County, Jr., Walker, Texas Ranger, CSI, Cheers, Days of our Lives, The X-Files, Desperate Housewives, Burn Notice, The Fresh Prince of Bel-Air, and had a role as Tom Friendly on the series Lost, a character who appeared in 20 episodes, as many as some former main cast members. He also played the murderous drug dealer Bo Crowder in a recurring role in the 2010 season of the hit FX TV show Justified.
Gainey attended the 2007 Emmys with Lost's show runners Damon Lindelof and Carlton Cuse.
Gainey played Kurtz/The Wizard in the controversial road-revenge short film Apocalypse Oz, containing no original dialogue as it is all taken from Apocalypse Now or The Wizard of Oz. In 2007 he appeared in a trio of films including Mr. Woodcock, Wild Hogs, and the sci/horror film Unearthed; in 2010 he appeared in Love Ranch.
In 2010, he voiced one of the characters of Tangled as Captain of the Palace Guard.
In 2012, he appeared in Quentin Tarantino's anti-slavery film Django Unchained, which also starred Justified cast member Walton Goggins.