Step 1: Freeze it
Take the garment and pop it in the freezer for a couple of hours.
Step 2: Scrape it
Once the gum has frozen hard scrape it off with a blunt knife. This should get rid of most, if not all of the gum.
Step 3: Scrub it
Squirt on a little washing up liquid and salt. Rub against the thread of the fabric and the last of the mess should come off.
Step 4: Wash it
Finally, chuck the garment in the wash and it'll be as good as new.