Bikewer got it right. Gods evolved out of animism and shamanism. And I'd add that not everything is human shaped in either.
In animism (and you can see for example Shinto for something that survived in an advanced society), everything has a spirit. Animals, trees, etc. Even a meadow might have its own spirit, and probably does. There are no gods as such. Some spirits are greater than others -- e.g., Amaterasu, the spirit of the Sun, sometimes called the Sun Goddess in western translation, is a LOT more powerful and important than your late great-grandma's spirit -- but there isn't really a clear cut between the two. It's a continuum of spirits, so to speak, from really puny to really great and powerful, but they're all spirits.
And in shamanism, the great bear spirit is, surprisingly enough, bear shaped. Now it is a very human-centred system, but not human-shaped.
But of course they acted as humans, because I guess the only way we know how to really treat other entities is by anthropomorphising them. It's not only humans doing it either. Seems to be a built in biological function. Sort of like how your cat only knows how to treat you as if you're another cat, or like your dog only knows how to treat you as the big dog leading the pack.
Which, I guess, the anthropomorphic gods only took to the logical conclusion.
But to return to gods, my counter-example would be the goddess Nut. (Btw, read with the same kind of "u" as in "put", not like the "nut" you buy at the supermarket.) She was more often represented as a huge cow than as a human. She also WAS the sky dome. Not just the goddess of the sky dome, but actually THE thing you see when you look up.
Another counter-example would be the Norse giants. Some of them are not very human-shaped half the time. E.g., Thor's mum, Jörð or Hlóðyn, IS Earth. No, really, you can even see the ethymology if you transliterate it as Jörth. Not the goddess of Earth, but actually Earth, the planet. (Yeah, Thor's mom is so big, she has a gravity well

) And yet in most representations, their world was not human shaped.
BTW, the sun and the moon were aslo giants. And at least for the moon, I'd think it would be hard not to see that it's not human shaped.