Let me start with the questionable, unprovable, yet common premise that the gods in general were born out of human fear.
If we look for the closest match to our word "religion" in the Hebrew Bible, the best candidate, interestingly, will be "fear of (the) god(s)". "Service" to the gods will denote the religious practice, but the basic religious attitude is fear. No matter how politically correct translations water it down into respect, reverence etc. -- one is primarily scared by the sacred. That's what all theophanies (manifestations of gods) are about.
Let me assume that the "sacred," "numinous," "divine" is basically a representation of man's fears. A kind of exorcism by which mankind writes out its multiple terrors (death, sickness, loss, frightening natural phenomena) and gradually learns to deal with them through ritual, prayer, narrative mythology, etc. Religion in this perspective amounts to a strategy of fear against fear. Imaginary fear to overcome real fear. Fear the objectivised fear in a speakable, negotiable way in order to deal with the unspeakable, overwhelming subjective fear. Fear of the gods paradoxically induces confidence (Proverbs 14:26f; Matthew 10:28 etc.). Originally in an eudemonistic way (the feared gods will bless, protect, etc.), later in a more sophisticated dualistic way (real woes turned into heavenly, spiritual bliss).
We may have outgrown the gods, but I doubt we'll ever outgrow the strategy of fear which I feel is the essence of religion. Even describing this process in a philosophical way is basically a religious act reflecting the very same strategy.
What do you think?