While discussing the complicated and contradictory relationship between religion and philosophy, the author criticizes the widespread simplified interpretation of this relation. Bearing in mind the theoretical and social equivocality both of materialism and idealism in their historical development, the paper shows the confrontation of religion not only with the philosophical materialism, but mainly with the philosophical idealism. The historical and logical aspects of the analysis reveal the epistemological essence of philosophical idealism, its advantage over religion. Religion and theology are opposed not only to science but to philosophy too, which shows the incompatibility of creative philosophical thought with religious belief.