I read recently (I think in a review of CBS's Elementary) that technically every adaption of Sherlock Holmes after Conan Doyle is "fanfiction" in a sense, and it's easy to see that some are really excellent stories. (::cough::BBC Sherlock::cough::) Those movies and TV series may be "continuing someone else's story," but you can't argue that they aren't graceful or told with skill.
Original fiction can have Mary Sue characters and characters with informed characteristics (which means that the writer says "Jon was brave and intelligent, well-respected by his peers," but Jon actually does dumb things, doesn't confront bullies, and gets ignored by his co-workers), and fiction based on someone else's premise or universe can be brilliant.
It's obviously easier to fall into the "crap trap" with fanfic; it just means that you have to be more on the lookout for it and work a little harder to avoid it. If someone else has defined Captain Kirk and Mr. Spock, you have to decide if you're going to follow their established characteristics, backgrounds, and storylines, or if not, how far afield you're going to go. Is it reasonable to extrapolate a romance between them? Maybe, maybe not. It depends on how you write them, what the setup of their romance is, how you present their thoughts and feelings, how they and the other characters react to the romance. (For example: a passionate, impulsive roll in the bunk after Spock survives the koon-ut-kal-if-fee in "Amok Time"? I'd believe that. Spock bringing Kirk flowers and snogging in the hallways? Not so much.)
I suppose it can be more obvious in fanfic when your story is not a "graceful" adaptation of the original, because the original is usually widely-known and easy to compare. That doesn't mean all fanfic is badly written or out of character in regards to the source material.
The things which make an adaptation or fanfic graceful are a lot of the things which make original fiction graceful: strong consistent characters, believable plots, and good writing. The main difference is that in fanfic, a lot of your story elements have been defined by someone else, but in original fiction, you get to decide all the parts on your own.