Equal Rites, by Terry Pratchett
A short one, this Discworld novel is about a wizard mistakenly passing on his power to a baby girl, when he thought it was a baby boy. The local witch is horrified - women can only be witches, not wizards! It's the wrong kind of magic entirely. But the wizard's staff seems permanently connected to young Eske, and at last the witch is forced to concede that the girl must be taught wizard magic by wizards, who are themselves loathe to welcome a female amidst their ranks. Fun and funny, as always, this story also injects a bit of darkness into the Discworld, with the introduction of shadowy beings who are attracted to a powerful young wizard and have evil intentions.