The Mirror of Erised
"Erised" is an anagram for "desire," which matches the Mirror's purpose pretty directly. Looking into it shows you whatever you want the most…which in Harry's case means seeing his parents alive and well again. (In our case, it's probably a room full of dachshund puppies.)
But this mirror isn't just a way of glimpsing perfect, puppy-filled happiness. It's dangerous: gazing into the mirror can cause those who look at it to fixate on nothing else until they…die. Death by dachshunds: that sounds pretty grim (and adorable).
DUMBLEDORE: Men have wasted away before it, not knowing if what they have seen is real or even possible.
Ah, Dumbledore. Spitting pearls of wisdom at every turn. Dumbledore's quip is, of course, another way of saying "get your head out of the clouds."
Who's The Fairest Of Them All?
The Mirror itself is a test on Harry's journey. It's both an obstacle to be overcome—step away from the dream of infinite dachshunds and nobody gets hurt—and contains a lesson that needs to be learned.
That lesson: you need to let your greatest desires go. Now that's not usually a moral we think of. We're surrounded by messages that tell us to shoot for the stars and dream big. We're encouraged to pump ourselves up by singing "Started From The Bottom" on repeat.
But there's a huge difference between chasing our dreams and making our desires come true at all costs. And that is exactly the difference between a Slytherin and a Gryffindor. House Slytherin is characterized by focused ambition. Gryffindor is characterized by bravery.
In terms of the Mirror of Erised, bravery can be read as being brave enough to live in the real, imperfect world. It takes a whole lot of gumption to live in the here and now.
And what Harry learns about the Mirror of Erised doesn't just have philosophical heft—it also has practical value. With what he's learned about the Mirror, Harry can successfully pull the wool over Professor Quirrell's eyes in the climax.