L. Frank Baum's original Oz novels are weird, especially if your familiarity with the Land of Oz comes from the classic 1939 movie musical. MGM gladly changed up many elements of Baum's first book (it doesn't even use the full title, The Wonderful Wizard of Oz), and never bothered adapting any of his subsequent 14 canonical Oz books. While we associate the Land of Oz with Dorothy Gale, the girl from Kansas, the central figure of Baum's world is actually Princess Ozma, who doesn't even show up until the second book, The Marvelous Land of Oz.
Baum had not intended to write a sequel, but after other books failed and after The Wizard of Oz was a huge success as a stage play, he decided to return to his fairy land. The sequel was a bald set-up for another stage show (an invading army is described as looking exactly like chorus girls), and it brought back Scarecrow and The Tin Man because the actors who played them on stage had become enormous stars*. Dorothy Gale, however, was left out.
The stage show had been such a huge hit that some elements from it made it into Baum's subsequent Oz books**. Most notably, the idea of a King Pastoria II, the rightful monarch of Oz, showed up in The Marvelous Land of Oz. In the sequel Baum reveals that Pastoria had been usurped by the Wizard upon his arrival in Oz, and that the Wizard of Oz had, in league with the evil witch Mombi, kidnapped Pastoria's daughter and the rightful heir to the throne, Ozma.
The protagonist of The Marvelous Land of Oz is a boy named Tip, who lives with Mombi. He ends up on the run from her and heads to the Emerald City, now ruled by the Scarecrow, just as it is being overthrown by General jinjur, who leads an all-female army. Tip teams up with Scarecrow, the Tin Man (who is now the king of the land of the Winkies, aka the Wicked Witch's guard from Wizard of Oz), the mystically animated Jack Pumpkinhead and a couple of other weirdo creatures to find Ozma and return her to the throne.
You know how in The Wizard of Oz Dorothy was looking for the way to get back to Kansas and it was right on her feet the whole time? This time Ozma was right under everyone's nose the whole time. Mombi reveals that she transformed the infant Ozma into Tip, and the witch casts her last spell to turn the boy back into a girl. In a book preoccupied with the battle of the sexes (Jinjur and her army of women are a straight satire of the suffrage movement), this is a pretty weird moment.
It's unlikely that L. Frank Baum was writing a book about transgendered people, but Ozma works pretty well as an LGBT metaphor. Ozma lived in a boy's body, but had been a girl all along. Tip is at first unsure that he wants to be a girl, but with the support of his friends he embraces his true self. Of course Mombi's spell is quicker than a course of hormones and surgery, but the result in the end is the same.
Ozma continues to rule Oz throughout the rest of the series. Children wrote in complaining about the repositioning of the Wizard as a villain, so in future book Baum retconned away the Wizard's involvement in her kidnapping. Elements of The Marvelous Land of Oz ended up being used in Return to Oz, Disney's previous attempt to get into the Oz business. That film flopped hard and remains tainted (although is considered a cult classic by some), and so Oz the Great and Powerful distances itself from any characters or concepts used in that movie; while it's the story of the Wizard coming to Oz, Ozma never shows up.
But perhaps we'll see Ozma in future films. And perhaps we'll get the story of a young boy turned into a beautiful princess.
* The book was even dedicated to the actors. Ironically they didn't want to reprise their roles in the stage version of The Wonderful Land of Oz, which was called The Woggle-Bug, and so Scarecrow and Tin Man were written out. The show was a flop.
** The stage show differed radically from the book. There's no Toto, as he's replaced by a cow. The cyclone brings not just Dorothy and the cow to Oz, but also a waitress and a streetcar operator. The wizard himself is the villain, and there's no Wicked Witch of the West. In some ways the show was probably like a modern Dreamworks movie, as it was filled with then-topical jokes about Teddy Roosevelt and John D. Rockefeller.