I don't know what the origins are, but it's a very venerable meme: it's implicit in places like Herodotus, when we learn that Great Pan is Dead, and the Greek and Roman writers who discuss why the age of miracles is over and if it ever existed at all, but it flowers in David Garnett's "The Twilight of the Gods and other Tales" (1888), James Branch Cabell's "Something About Eve" (1927), and in a great deal of Unknown type fiction in the late 30s and 40s, stories by people like Fredric Brown. I tend to think of it as one of those self-evident ideas where the actual historical observation (people make gods; the people are conquered or intermarry and those gods are abandoned and forgotten) can become a very solid metaphor for a lot of things as soon as you assume that the gods are real (and thus are created by men, and cease existing when they are no longer worshipped, etc.).
I started using it in Sandman, and during The Kindly Ones I realised that I could use it to say some interesting things that Sandman wasn't about... which turned into American Gods.
And the above post was already sitting on here -- I think I wrote it in an airport yesterday -- when I went online blearily this morning, thus giving an impression of intelligent wossname that I do not currently possess. Yesterday I travelled to Norway, signed in Tronsmo (possibly my favourite bookshop. It's just like a normal bookshop, only without all of the books you don't want to buy) and then to the university at night to be interviewed in front of a few hundred people about writing and Coraline and things.
Slept really well and several weeks less than I needed to....
Press interviews start in 20 minutes, and I have to put on clothes and somehow look human again and remember how human beings put words together into sentences. It'll come back to me.
And they'll have photgraphers. I can see what I look like right now in the mirror. They'll have cameras. Dear god.
Also yesterday I presented Coraline to a group of booksellers, in company with Margaret Atwood, who presented Oryx and Crake. She told the booksellers that her book wasn't speculative fiction because everything in the book was based on a scientific speculation in a brown envelope in her research box which left me scratching my head as to where she thinks science fiction (or even speculative fiction) writers get their ideas from. ("Dear God, for years we've just been making this stuff up! And now that Atwood woman turns the whole thing on its head by basing it on scientific fact! Why the Hell didn't we think of that?")
Checked the schedule. I think I can get to sleep in, next Tuesday morning in Croatia. Yay.