Was the chewing gum the diet type that contains xylitol? This ingredient will be losted on the label. Xylitol is very toxic to dogs. It usually causes vomiting, trouble standing, seizures and sometimes death. This needs to be treated by a vet with intravenous fluids and other drugs for several days.
Chewing gum without xylitol is not toxic. If enough is eaten, it can cause indigestion and diarrhea. It should not cause obstruction.
The best treatment for indigestion is to withhold food 12-24 hours. Peptobismol can help some dogs with diarrhea. The usually recommended dose is 1/10th to 1 ml/pound of body weight of the liquid product. This is a teaspoon for small dogs and a tablespoon (15 ml) for medium to large dogs. 1/4 tablet for each 20 pounds can also be used.
If he gets worse or is not improved by tomorrow morning, consider having him seen by his vet.
Let me know if you have follow up questions.