An early story I've come across is the Star Trek "Who Mourns for Adonais?" about how the Olympian gods were actually powerful aliens. When they realized that humanity no longer worshiped them, they (with the exception of the story's Apollo) "...spread themselves upon the wings of the wind and faded away into nothing...".
A more recent one would be the Ori of Stargate Atlantis. And I quote, "...ascended beings can be empowered by massive numbers of humans worshipping them." (In one episode, when people stopped believing, Adria lost most of her powers and Morgan de Fay was able to engage her in an eternal battle.)
My question then is not about stories how primitive men confused aliens with gods (the well-known "ancient astronaut theme"). Those are quite common. Rather, I'm looking at the sub-genre where the aliens willfully masquerade as gods and absorb the "worship energy" of their believers.
Question: Who was the earliest author (and what story) do we first find this "quasi-vampiric" concept? (It is not a perfect comparison because the believers do not die -- they just feed and feed the alien with their worship.)