Hard-to-digest foods like table scraps or spicy foods can give your dog an upset stomach, which can result in excessive gas or excessively smelly gas. Feeding them food or snacks with low-quality ingredients, fillers, or artificial preservatives can also give your dog gas.