In the book, Sophie possess a certain kind of magical power - she makes things real by saying them. She can lay spells just by saying them. When she made hats, and she told a hat that it would make a rich young man fall in love with it, a rich young man fell in love with the woman who bought it. When she told a hat it would make some woman look beautiful, everyone knew the mayor’s wife looked positively radiant in it. It’s what drew the Witch to her hat shop in the first place. When she cursed out a bucket of plant food, it turned to potent weed killer. When she told herself she might as well be an old woman, when she told herself she was doomed to fail, when she told herself she was plain and boring and no one would ever notice her, no one did.
When Howl tried to break the spell on Sophie, and he tried many times, he always failed. Not because his magic was less powerful than the Witch’s, but because it was less powerful than Sophie’s.