Try switching him to a high protein food like Evo and adding a bit of chicken stock to make it more appetizing. On a high protein diet he will have plenty of calories for fuel that will be turned to muscle, with proper exercise.
The main thing to be noted in gaining weight is to check the worm infection. It has to be dewormed foe the effective way of gaining weight. The dog has to be provided with diet enhancer which would stimulate the appetite to consume more food. Healthy protein related food has to be advocated.
Like anything else, a monitored diet is needed. Add protein, starches, and lots of carb rich foods to your pets diet. He/she will gain weight in no time.
Consider changing to a brand of dog food with better nutritional value. It may also be a good idea to feed the animal throughout the day, instead of once a day.