Common sense should tell you that gods are the creation of Man. Never mind what's written in the holy books.
The writing of fiction is as old as writing itself.
In fact, I'd go further and say that fiction (the ability to fool others) is OLDER than the written world, maybe older even than the spoken word.