'Gas' is not necessarily a symptom of digestive upset in dogs (as you probably know, most dogs are somewhat gassy!).
Digestive problems often clear up within a few days. However, take your dog to the vet if he's lethargic or depressed; if he's showing signs of pain; if there's blood or mucous in his stool; if he's dehydrated, refusing to eat, or the symptoms don't clear up within a couple of days.
Your vet might put your pet on a different diet for a few days until the symptoms clear up, gradually transitioning back to the dog's regular diet. He or she may prescribe a drug to help clear up the condition. If your dog is also dehydrated due to vomiting / diarrhea, fluids might be given as well.
Sometimes feeding older dogs several times a day (instead of just once or twice) can minimize digestive upset. Take their usual amount of food and break it down into 4 or 5 equal portions. It's less food per feeding, but on the plus side, it gives pets something exciting to look forward to, several times a day!
Dogs who are having repeated bouts with digestive upset may need to go on a long-term management plan. The vet may suggest changing foods to something more easily digestible, or adding supplements to your dog's diet. If your dog will accept it and can tolerate it, try giving him a tablespoon or two of plain yogurt with live cultures (no added sugar, flavorings, etc). Yogurt contains probiotics which can help to keep his gastrointestinal tract healthy. Note that some dogs cannot tolerate yogurt even in small amounts. As always, check with your vet first before making any changes to your dog's diet.pet waterer, which has a larger supply from which to replenish their water until you have a chance to clean and refill. Monitor your dog to make sure he's drinking enough and does not get dehydrated. Serious dehydration may require admittance to the vet clinic for fluids and to correct the dog's electrolytes.
Make sure your senior dog stays active. Exercise helps to keep the digestive system moving the way it should. Obviously, older dogs can't move around the same as younger ones... but some gentle exercise every day, in several short sessions each day, can be very beneficial. If your pet is in pain from some other medical condition, addressing the source of the pain - or at least managing the pain - can make him more willing to move around.
Senior dog digestive problems aren't uncommon. Take appropriate steps right away, including a visit to the vet if necessary, to help your dog feel his best again as soon as possible.