In the world of fanfiction, you often find the expression a ‘mary sue’. This refers to a story written where the author is clearly the main character in its highest form; beautiful, smart, and simply amazing in every way. What makes the Mary Sue so undesireable (despite beauty, smarts, and being perfect) stems from the writer often writing herself into the role. A Gary Stu is the male equivalent.
More terms and background on fanfiction can be found here.