Usually what we put in our mouth takes hours or days to dissolve and excrete, your stomach is incapable of breaking down chewing gum the way it would other foods. Chewing gum is composed of gum base, sweeteners, coloring and flavoring. The gum base is indigestible, it is a mixture of elastomers, resins, fats, emulsifiers and waxes. This insoluble rubber-like material is made up of synthetic chemicals, which gives chewing gum the chewy texture that is designed to resist digestive properties of saliva in your mouth, causing gum to pass slower than food.
When your body recognizes the gum to be useless by the digestive system, our stomach muscles contract and relax slowly forcing it out. Your gut then moves the gum along through the intestines until it is finally eliminated as human waste. Studies have shown than it might take a day or two until the gum is eliminated from our system. Rare cases in which swallowing numerous or large amounts of gum over a short period of time may cause the blockage of the digestive tract. 
If gum took years to digest, medical imaging tests like the MRI and procedures like endoscopy and colonoscopy would routinely turn up instances of old chewing gum in the digestive system. Maintaining this myth appears to be due to generations of parents trying to teach children not to swallow non-food items and the fear of stories and rumors about medical cases where swallowing gum had caused some serious health problems in children. The good news is that chewing gum won’t remain in your system for years, and likely not even days.