The phrase often implies unfair or bullying behavior in social situations. The whole class ganged up on the new student, making him feel unwelcome.
Pro Tip 2/3
Power Imbalance
It's used when one person is outnumbered and potentially overwhelmed by a group. During the game, the opposing team ganged up on our star player to weaken our defense.
Pro Tip 3/3
Shared Purpose
People gang up for a common cause, which may not always be obvious. Activists ganged up to protest the new policy.