Philosophers of religion have tended to focus on Freud's dismissal of religion as an illusion, thus characterising his account as primarily hostile. Those who wish to engage with psychoanalytic ideas in order to understand religion in a more positive way have tended to look to later psychoanalysts for more sympathetic sources. This paper suggests that other aspects of Freud's own writings might, surprisingly, provide such tools. In particular, a more subtle understanding of the relationship between illusion and reality emerges in his theory, that itself offers a useful way of understanding the meaning and significance of religion for the human animal. By exploring these sources a view of religion emerges which connects it closely with the processes of imagination and creativity. Under this view, religion is more than just a set of hypotheses to be proved or disproved. In religion, we have access to the most deeply rooted wishes and anxieties of the human heart, and thus its investigation enables a deeper understanding of what it is to be a human being.