I found this interesting quote from the catholic encyclopedia:
But though the word demon is now practically restricted to this sinister sense, it was otherwise with the earlier usage of the Greek writers. The word, which is apparently derived from daio “to divide” or “apportion”, originally meant a divine being; it was occasionally applied to the higher gods and goddesses, but was more generally used to denote spiritual beings of a lower order coming between gods and men. For the most part these were beneficent beings, and their office was somewhat analogous to that of the angels in Christian theology. Thus the adjective eydaimon “happy”, properly meant one who was guided and guarded by a good demon. Some of these Greek demons, however, were evil and malignant. Hence we have the counterpart to eudamonia “happiness“, in kakodaimonia which denoted misfortune, or in its more original meaning, being under the possession of an evil demon. In the Greek of the New Testament and in the language of the early Fathers, the word was already restricted to the sinister sense, which was natural enough, now that even the higher gods of the Greeks had come to be regarded as devils.