It basically means they are a 'spare' member of the company. Essentially general understudies, they get all sorts of jobs backstage - handling props and effects, helping the dressers etc. The job's often given to the newest or least experienced member of the company.
On a film crew - I imagine the same word applies in the theatre - the "swing gang" are those responsible for preparing and changing sets. The word may possibly be associated with one of the ancient meanings of 'swing' which was 'labour'. Thus, the swing gang may be "the ones who do all the hard labour".
Yes, it refers to dancers in musicals. The swing understudies everyone and leaps in if someone's sick. It's a very hectic job and not to be envied. If they act as a set-mover/dresser as well I think someone's taking advantage of them - they're busy enough as it is!
There are two types of swings- the ones described perfectly by RogK and others who are general understudies, and swing technicians, who perform the same job but for all technical aspects- one night they might be doing follow-spotting, the next night ASMing, etc.