My advice is to take the poor thing to the vet before you start administering "maybe it's this" and "what if it's that" home remedies. It could be any of the conditions everyone has suggested, but please just don't experiment. Find out for sure and end this dog's suffering!
My dog's problem was dry skin, my son's dogs (3) had all kinds of allergies to things inside and outside and my sister's dogs had thyroid problems. It pays to check!