Pan’s Labyrinth is a fairy tale about the importance of moral disobedience: for refusing to harm her brother, even at the cost of her own life, Ofelia is resurrected before a heavenly Trinity with the rose of eternal life imprinted on her shirt.
By setting Ofelia’s tasks against the coming of the full moon (associated with femininity in the Western tradition), Del Toro invites us to read his film as a commentary on what it means to be an adult, and Ofelia’s journey as a passage to adulthood. The bleeding book (“what comes next,” Ofelia asks?) is clearly menstrual in nature, while the challenge of the tree cave (with its vaginal entrance and history of repressed fertility) also carries sexual overtones, with the defeat of the toad requiring Ofelia to assert control over her own sexuality and cast aside the “pretty” clothing the Captain offers to tempt her into an infantilized adulthood. 
As in other Christian films like Inception, the labyrinth is offered to the audience as a symbolic mirror of the mortal world itself. And this is why the fantasy elements in the film are so bleak: for just as the real world is filled with characters who torture and kill (stacked hierarchies of hunters and hunting), so is the underworld inhabited by their equals: carnivorous fawns and fairies, and the Pale Man who feasts on whatever children are unlucky enough to stumble within grasp. As the pile of worn out shoes in the monster’s lair indicates (with the fate of the unlucky children paralleling that of Ofelia’s mother), there is no escape from the predatory nature of the world through transitory fashion or wealth: the world of humanity is a world of death because such is the nature of mankind itself — a point made most elegantly through the symbol of the mandrake root, a creature which is made human by feeding it blood.
Critics who argue that the fantasy elements serve as a psychological coping mechanism for Ofelia misunderstand the film. We can be sure Ofelia is not imagining things not only because her fantastical experiences influence the plot in the real world, but also because her experiences in the underworld anticipate developments later in the film. And there are clear parallels between the two plot strands: the toad’s repression of the tree’s fertility clearly mirrors the Captain’s repression of feminine sexuality, while the Captain’s staggering pursuit of Ofelia at the climax is visually evocative of the Pale Man’s earlier pursuit. The equivalence in the former case is emphasized by the script’s insistence on the Captain’s appetite (he is shown feasting), while the latter is cemented in the repeated visuals of both sitting at the heads of their respective tables, as well as through more subtle narrative touches: just as Ofelia’s theft of food from the forbidden table awakens the deadly monster, so does the theft of supplies from his pantry awaken the Captain to the feminine betrayal within his own household.
So very unlike the emotional kind of “magical realism” that we see in authors like Murakami, what we have in Pan’s Labyrinth is deliberate moral pageantry that makes an ethical argument about what it means to be an adult. The fact that all three underworld tasks require Ofelia to embrace disobedience (rejecting the fawn’s demand for unquestioned authority and disobeying the instructions of the magic book) tells us directly that the role models for adulthood in this film are the figures of Mercedes and the doctor, characters Del Toro paints as doubled parental figures for the young girl. Both Mercedes and the doctor reject violence as a tool of resistance, but act humanely in service to others even when doing so requires paying a blood price: when the doctor is challenged by the captain on this point, his answer speaks for the morality of the film itself: “to obey without thinking… that’s something only people like you can do.”
Adulthood thus becomes the acceptance of suffering if necessary for moral good. The cost of the Doctor’s disobedience is death, and yet in the eyes of the film it is his refusal to do evil that allows him — as later Ofelia — to see. The pain and suffering that individuals accept in the course of moral disobedience — the tax imposed by the thorns in the fable of the rose — thus becomes the price of the symbolic rebirth that provides a triumph over death itself. The end of the film thus shows Ofelia — who has accepted her own suffering as the cost of protecting her brother — transformed into a Virgin Mary figure, a symbolic mother who pays the blood sacrifice required as the cost of bringing life into the world.
With this the rest of the film’s thematic subtext falls into place. In terms of overarching symbolism, just as the doctor stands in opposition to the Captain, we also have the opposing symbols of the true and false fathers, a religious undercurrent which lends significance not only to Ofelia’s continual rejection of the Captain (“he’s not my father”), but also deepens the political undertones of the film, which show the Franco regime co-opting the Catholic church and assuming the role of a false Church through its distribution of the “daily bread” of the community.
Thus also the repeated visuals of gaping mouths (symbolizing the world’s cycle of violence and associated thematically with it through the statue that sits at the entrance to the labyrinth) as well as images of missing eyes (symbolizing moral blindness and unethical behavior). In one of the film’s many nice touches, it is the humane and ethical doctor who wears glasses and thus “sees”, while at the opening of the film we also see Ofelia replacing the missing eye of a decrepit statue. It is Ofelia who will likewise come to “see” and whose refusal to be complicit in evil is the act which transforms her from a child into a maternal figure whose blood sacrifice restores moral order and biblical fecundity to the world.
And now we reach the end of the film. Just as the captain dies sonless, denied eternity through the thematic loss of his bloodline, we see Ofelia gain eternal life not only through her symbolic assumption of motherhood, symbolic sainthood, as well as the afterlife sequence mentioned above, but even through the defeat of time itself, as the forward momentum of the timepiece which condemns the captain to death is somehow reversed in the closing moments of the film as Ofelia’s blood flows backwards in time, pushing the film itself into a thematically circular loop that is visually suggestive of eternity.
: this is the rose from the fable Ofelia tells her unborn brother. As the story goes, it provides the bearer with eternal life, but sits withering because man’s fear of death keeps him from accepting the price of death which must be paid for it. It may also be an allusion to the rose from the Empyrean in the Divine Comedy, which symbolizes the love of God.
: the core message here is that behaving ethically requires the willingness to accept pain and suffering as the cost of doing good. This pain and suffering — the tax imposed by the thorns/death in the rose fable — is now presented in this maternal imagery as the blood associated with childbirth. The Christian image of the mother is invoked as a figure who echoes Jesus in giving life to others by willingly assuming pain and suffering. And in this light, note how Ofelia first rejects motherhood out of an unwillingness to pay the price, only to reverse her choice at the climax of the film. And through this reversal, Ofelia becomes a symbolic mother-figure to her infant brother by paying the price thematically required through her own blood sacrifice.
: when Ofelia asks Mercedes if she considers her mother beautiful, this reflects a childish concern for her own beauty that Ofelia overcomes most visibly through the first task which leads to the destruction of her pretty dress and shoes. We return to symbolism of clothing reflecting true beauty only at the end of the film, which presents Ofelia resurrected and possessed of more beautiful clothing than she before gives away.
: the captain is shown wearing glasses at one point, but these are sunglasses which obscure rather than illuminate. His vision is – thematically – cloudy, just as his behavior is – as seen through the mirror – ultimately self-destructive.