Various conceptions of gods and goddesses map partially to aspects of the subconscious or unconscious. In this sense, one can think of a typical pantheon as a (antiquated) set of tools for interacting with and remembering aspects of the (subconscious or unconscious) mind.
In The Iliad, for example, there are various scenes where gods or goddesses appear to humans. In reality, there is a spectrum of sorts of appearances of information from the subconscious or unconscious to the conscious, and the appearance of gods or goddesses can be understood as standing in this spectrum (along with problem solving, the ‘muse’, and so on).
Understanding gods, say, or muses, as coming through part of the brain (or what have you) can lead to a possibly incorrect conclusion: the brain explains the phenomena, i.e., the phenomena are nothing but the brain acting in a certain way.* To see that this is problematic, consider an example: if I am looking at a tree, presumably there is some correlate processing occurring within my brain. Yet, it would be incorrect to conclude that trees are brain processing. The information being presented is of something external to my ‘self’, and is in some sense veridical.
*It is another question what the ‘brain’ is – i.e., the concept ‘brain’ is a specific kind of representation of something, i.e., a ‘scientific’ representation. See here.
So, evaluating the veridical nature of purported experiences of gods, say, requires looking at the causal chain which leads to that experience. Are there really things outside of ourselves which have these mental properties and these abilities? (In a way, the unconscious is a mental thing outside our ‘selves’.)
For a question like “Do gods (say) exist?”, it is easy to say ‘no’, but a more careful evaluation brings certain puzzlements to light. For example, to the question “Do (did) dragons really exist?”, the concept ‘dragon’ originated from fossil evidence, and in this sense refers to something real. If that is what is meant by whether there ‘really are’ dragons, then the answer is ‘yes’. Yet, usually something more is meant: just how accurate of a concept it is. Here, there isn’t a yes-no answer, but rather a sliding scale of accuracy. (It isn’t that simple: for example, one concept could get A right but B wrong, another A wrong but B right.) For example, moving from ‘dragons’ to ‘dinosaurs’ was (on the whole) a step in accurately conceptualizing the nature of those things to which the fossils belonged. This would favour the idea that dragons don’t exist. However, we have then continued to change our concept ‘dinosaur’, in minor and major ways. So we would be put in the position of continually saying “The ‘dinosaurs’ they believed in 5 years ago don’t exist,” which is an odd way to talk. We don’t say ‘dinosaurs’ no longer exist, every time we make a conceptual change. (See here.)
(Because we invented a new term for those things to which the fossils belonged, a radical conceptual dimorphism can develop (i.e., our concept attached to the word “dinosaur” can become much different from the concept attached to the word “dragon”). If we had used the same word, we would have had a conceptual change in what was associated with it, which would incline us less towards thinking: ‘old dragons’ didn’t exist, but ‘new dragons’ do – rather, we would be more inclined to think dragons are real, but our concept of them has changed. This can be seen by looking at all sorts of more quotidian concepts, where we have retained the name but our understanding of the nature of the phenomenon has changed significantly.)