The God impulse, like so much else of human personality, grows out of our hardwired primitive ego. It is pretty much inseparable with the ego’s primary mandate that we survive and seek advantage at all costs. Meaning of course that this survival impulse is so all-powerful that we often mentally push existence beyond flesh and blood into infinity, an after life like the Christian ideal of living forever with Jesus in heaven.
Since this survival impulse has been within mankind for all times everywhere, it is therefore not surprising that we also find various forms of the supernatural, often highly complex expressions and rituals that we associate with religion, throughout all societies as well.
The Bible claims that God made man in his own image. In reality it is rather the other way around. Since the God/Religious impulse stems from within us, and being egocentric creatures we naturally often gave Gods and God human characteristics. In the Christian religion God is more or less pictured as a father figure somewhere in the great beyond keeping tabs on who is naughty and who is nice. (I suppose the character of Santa Clause is an offshoot of this notion.)
Of all mankind’s past societies perhaps none copied the characteristics of the human soap opera into their Gods personalities more so than the Greeks. Greek Gods are numerous and are believed to carry on lives of hate, jealousy and love little different than the Greeks themselves, except of course that Greek Gods possessed super powers far in excess of human capabilities.
Today’s highly popular super hero moves, especially entertaining to the young, can be thought of as a kind of a modern version of the all powerful Greek God world. So maybe religion in advanced societies is not fading so much as it is merely being expressed and appreciated in different forms.
In the not so egocentric modern world of science, what might pass for God is the ultimate singularity from which all time, space and matter emanates. One might suspect that it is with this scientific concept of singularity that men of science and religion merge with only semantics being the difference, with, however, the great exception of those who would insist that religious stories that are in rational minds obviously a romantic blend of myth and historical fact must be taken as literal truths.