A great deal of fantasy is set in a vaguely medieval setting. And yet much of this fantasy leaves out a crucial part of real medieval life: religion.
J.R.R. Tolkien was a good Catholic, and presumably he did not feel he could properly introduce an imaginary version of the church, especially since "Lord of the Rings" supposedly takes place hundreds of years BC. George R.R. Martin, who is not a good Catholic, has created his own religions for "The Song of Ice and Fire," all polytheistic, but with organized systems of churches and priests and rituals.
Real medieval fantasy, that is fantastic stories written during the Middle Ages, always included religion. The authors could not imagine a world without organized Christianity. People might transform into hawks or see a parade of candles carried by invisible hands, but they still went to church—and worried (often quite appropriately) about going to Hell.
My own fantasy (see more here), set in an alternate version of the Middle Ages, includes organized religion. It wasn't a deliberate decision; rather, when I started writing about a king in a castle, he logically had a chaplain, a castle priest. The Christianity of my "Yurt" series will remind a person of medieval Christianity, although it is not a truly accurate depiction. For one thing, the organized church in these stories has no hierarchy above the level of bishop (no archbishops or popes). But there are plenty of elements I've taken from real medieval religion, like reliquaries and cranky saints and depictions of Hell.
I always dislike it when fantasy stories that do depict some version of organized religion have all the priests either hypocrites or cunning schemers or foolish and deluded (or all three). When I made religion a real force in the world of my stories, I had to have at least some priests who were genuinely devout and holy.
Since my stories also have organized wizardry (which of course the real Middle Ages did not), there are lots of opportunities for conflicts between these two institutions and for misunderstandings between people belonging to one or the other.