I think there is something to be said for people who work out too strenuously and don't eat well enough nor get sufficient sleep. If your wear your body down and don't give it what it needs to rebuild and rejuvenate I think it can make you susceptible to things like the cold and possibly the flu. That's just my opinion.
But I think the most important thing to keep in mind is to never touch your face. At a gym, people are touching the handles of dumbbells and levers on machines and then they wipe their brow, rub their eyes or touch their face in some way. That's the fastest way to get a cold.
NEVER TOUCH YOUR FACE WHILE OUT IN PUBLIC UNTIL AFTER YOU'VE THOROUGHLY WASHED YOUR HANDS