If you're like me, you probably think this phrase needs no elaboration. It's perfect, isn't it? Everyone knows what a goody two shoes is. Like "teacher's pet", no one wants to be thought of as one. So this isn't a phrase I went out of my way to research. You could say it found its way to me. I was surfing around on the Internet Archive, which has a massive amount of downloadable text, video, music and so on, looking at what was most popular. Most of the most popular stuff was in languages I can't read, but there were a few in English, and one of them happened to be an old, old book called Goody Two Shoes. It was published in 1765 by an anonymous author, who many have thought may have been Oliver Goldsmith, though largely through circumstantial evidence. You can take a look at an 1888 version here .
Let's clear up some misconceptions about Goody Two Shoes, whose name in the story was actually Margery Meanswell. She and her brother were orphaned. He managed to stay in shoes--poor Margery did not. When they were finally rescued by some, well, do-gooder, Margery finally acquired a pair of shoes, and a new nickname.
She wasn't called Goody because she was a goody goody, though. Many women were called Goody in her day. It was a contraction of "Goodwoman", the counterpart to "Goodman". You remember Nathanael Hawthorne's short story "Young Goodman Brown", don't you? Of course you do. And if Goodman sounds odd, think about "gentleman" and it will not seem so much so.
Here are the things Goody Two Shoes did that were so despicable. She devised a system of teaching other children to read; she foiled an attempt of robbery and murder; she rescued a raven and taught it to read (!) and she also rescued a pigeon. She did of course live happily ever after, but what other kind of ending do you want for a children's book?
In trying to discover when the term from an immensely popular children's book had become almost entirely pejorative, I ran across an article by the sci fi and fantasy author Diane Duane, which covers much of this same ground, only more thoroughly. Take a look HERE.