Mary Sue comes to us from Star Trek fan fiction. She was in a parody of the fanfic of the day, and her fame has grown since. As you’ll see if you follow the links, nailing down what is and what isn’t a Mary Sue character is like nailing Jell-O to a wall.
The definition I want to focus on is Mary Sue as an author avatar: the over-the-top perfect character that outshines the sun itself. This is the author writing himself into the story in an idealized form for the purpose of wish fulfillment. The author adds a new character who is smarter, braver, more beautiful, more caring, more, more, more than the original characters, who instantly adore the avatar.
This sort of character shows up in original fiction, too. Mary Sue wasn’t a 20th century invention, either, but was around at least in the 19th century.
The term has come to be strictly pejorative, and there is growing controversy in some circles about its use. There are those who believe that a strong female character is too often labeled a Mary Sue. Or that any character who has his head screwed on reasonably well is tarred with the Mary Sue brush. These are valid concerns.
The point I want to make today is simple: enjoy Mary Sue in your daydreams, but leave her out of your fiction. She merely annoys the reader.