Wesley Crusher is the reason the article "Creator's Pet" on TVTropes used to be called "The Wesley":
He nearly killed the show in the fans' eyes, by being an Insufferable Genius and an admitted Canon Sue for Gene Wesley Roddenberry. Whenever the other characters weren't praising him undeservedly, they were rudely dismissing him undeservedly, depending on which one would make him look better. Even worse was the 1987 Writer's Strike, which left the network sitting on a ton of unused "Wesley Saves The Day" scripts as most of what they had to work with. (Ironically, these episodes are generally considered So Okay, It's Average, making him marginally more likable when he's the focus character, as opposed to when he's given such a large role in other episodes.) It got so bad that even Wil Wheaton, the actor who played him, hated his guts. He became a bit more bearable with the 5th season episode, "The First Duty", where he screws up big time by participating in an illegal stunt that gets a schoolmate killed and then attempting to cover it up, and for once he isn't Easily Forgiven, or otherwise allowed to get away with it. Instead, this leads to him being bawled out by Captain Picard and getting that school year's marks voided. Eventually he was Put On A Shuttlecraft and the character disappeared from the series, only coming back for the near-final episode Journey's End, and finally being cut out of a cameo appearance on Star Trek: Nemesis.
tl;dr: Gene Roddenberry liked the character far more than the fanbase did. He tried to fix that by making him look better than he was at the expense of other characters. This backfired.