This movie is the story of a girl who gets everything she always wanted, only to discover that it wasn't what she wanted after all. (It's also the movie that made a whole new generation of girls lust after David Bowie.)
Near the beginning, she tells a story, that there was a girl who was the slave of her father and stepmother, forced to care for her baby brother. But the Goblin King had fallen in love with the girl and given her the power to call upon him for aid. And one night, the girl had finally had enough and asked the king to take the baby away from her.
Every word of that story turned out to be true. (Although the slave bit was an exaggeration.)
Leaving his room, she said, "I wish the goblins would come and take you away, right now." And those were the magic words that let the goblins come out and take him. The King, Jareth (David Bowie), then appeared. She asked him to return her brother, saying she didn't mean to say the words, but he insisted that she said them and can't take them back. Then he offered her a crystal ball that would let her see all her dreams come true, but she could only have it if she let the boy go. She insisted that she couldn't, and so she had to get through the labyrinth to the castle inside to get him back.
On the way, her faults are brought to the forefront as they hold her back. The first person she meets, Hoggle, tells her that she takes too many things for granted, the first thing being that there is no entrance. Hoggle reappears several times, actually traveling with her and becoming her friend after he helps her get out of the oubliette (a variation of the French verb "oublier," to forget).
The next thing she takes for granted is that there are no branches to the first tunnel. A worm points one out to her, and then tells her not to go a certain way. She accepts this information and goes the other way. (Personally, at this point I would have asked a question that shortened the whole movie: "Why not?" For after she went through, the worm said that the bad way went straight to the castle.)
So now she is inside, trying different paths and marking her turns with lipstick. When she discovers that the marks are being changed, we hear the most common words out of her mouth: "It's not fair!" Later, when Hoggle says the same thing to her, she finally understands why people don't want to hear it from her: the old adage that life isn't fair. (One of my favorite quotes is from Marcus on Babylon 5: "Wouldn't it be terrible if life were fair, and all the bad things that happen to us are because we deserve them?")
Other friends she gathers on her way are Ludo, a huge but gentle beast who has the power to call rocks, and a knight-errant dog who rides a dog (which incidentally is the same type as her own dog, Merlin, and is even named Ambrosius, which was another name used to refer to that famous wizard).
Her last major setback is in eating the peach Jareth forced Hoggle to give her. It sends her into a dream, inside the crystal, where she is dancing with him at a ball, just like out of a fairy tale. But she knows something is not right, so she shatters a wall to get out and finds herself on a trash heap. An old lady with a pile of things on her back takes her into a copy of her room and starts handing her all her favorite toys, things she always loved. But then she sees the book she had been reciting lines from at the beginning of the movie: "The Labyrinth." She throws down all the toys, calling them junk, and breaks her way out of the room. Then she is with her friends again, just outside the walls of the Goblin City.
They make it to the castle, and she goes on to face Jareth alone. She begins to recite the lines from the book:
Through dangers untold and hardships unnumbered,
I have fought my way here to the castle beyond the Goblin City.
My will is as strong as yours, and my kingdom as great.
But at this point is the line she can never remember. As she hesitates, Jareth again offers her all her dreams. He claims that he put all those hardships in her path because that was what she expected. And although he does not say it, it is clear that he really does love her, but he doesn't understand her because she didn't understand herself (which is to be expected, considering she's a teenager).
Then she remembers the line, and says it: "You have no power over me." The world shatters, and she is returned to her room, and her brother to his. She gives him her old teddy bear, which she had guarded jealously before. At first she thinks it was a dream, but then her friends appear in the mirror and say they will always be there if she needs them. She say she does need them, and they all become real, there in her room.