So, what is the Ghost-type?
Almost all JRPGs have some sort of cursing move and an undead enemy group, and Ghost-types cover both. While Curse wasn't originally a Ghost-type move, with the removal of ??? type Gen 5 onwards there was no other choice for the move to go. Initially Ghost-type was limited to one family, and eventually two families, but after Gen 3 Ghost-type became much more commonplace.
Due to its initial connection to undead enemies, Ghost-type started off as a physical type, but as Ghost based enemies became more common and more distinct than their undead counterparts, Ghost-type found a more comfortable home as a Special oriented type, though Physical moves are still the dominant moves in terms of amount. As time went on, Ghost-types also became associated with dark magic, but that's largely because it needed to differentiate itself from the Dark-type, which had the opposite problem. It is possible that Ghost-type will eventually be forced to a status based role as Dark-type gets more Special moves in the future, but we have to wait and see for that to happen.
The History of the Ghost-type:
In the original games, Ghost-types were almost a joke. Having only one representative, Gengar, and failing to achieve its single marketed status, defeating Psychic-types, Ghost-types were a complete non-starter. Not only that, Ghost-type had terrible moves like Lick, and the sole Ghost-type was specially oriented, while the type was a physical type. However, Ghost-type had great immunities to Normal and Fighting, only one weakness which was to itself, and only two types which were immune to it. Gengar also had great stats due to being a trade evolution, which made it the sole Pokémon who became OU in all generations.
The few Ghost-type moves in this generation were not good at all, as they were largely designed for in-game. However, Ghost-types were blessed with association to Psychic-types and Electric-types, alongside access to Drain moves. This combined with a few neat status moves allowed the type to actually make the push and become a decent type.
In the second generation Ghost-types were partially fixed. The major fix was changing its interaction with Psychic-type. To balance this, Ghost-type was resisted by the the new types, and Dark-types were super effective against Ghost-types as well. However, Ghost-types remained strong and gained a new decent Ghost-type, Misdreavus, which as the sole pure Ghost-type became OU in an instant despite its stats.
This generation continued on to make Ghost-type a status oriented type by introducing three new status moves, one which became a TM, Nightmare. Another TM move was Shadow Ball, which became the sole primary TM for Ghost-types. These two additions made Ghost-types a primary coverage type for Dark, Psychic and Bug types.
The new third generation four new lines for the type, though none of them had the stats of a Gengar. Nonetheless, one of them was Sableye, who had no weaknesses, Shedinja was another, who had a weird Wonder Guard ability, Banette, which was the sole physically offensive Ghost-type, and Dusclops, a good defensive Ghost-type that served as a Rapid Spin blocker in this generation. Sadly Ghost-types were not blessed in Ability department, relying predominantly on Levitate like Psychic-types and Insomnia & Pressure like Dark-types.
In the third generation Ghost-types gained three new moves, one being Astonish, a popular but pathetically weak starting move, Shadow Punch, a rare mid-game move, Grudge, a move that would become more popular. Nightmare wouldn't remain as a TM, and become a Move Tutor only on the XD game.
The physical and special split hurt only one species, Banette. The rest of the species got fine enough, though Dusclops was hit by hindsight. In this generation, two species got evolutions, Misdreavus in the form of Mismagius, and Dusclops in the form of Dusknoir. Both of these were very powerful in their own generations, but as the metagame changed they were dropped quite fast. Spiritomb, Rotom and Froslass were mediocre but useful, but as time went on became much less useful. Nonetheless, this generation introduced the first major Ghost-type legendary, Giratina, and increased the common BST for the type further.
The new moves introduced in this generation were Ominous Wind, an Ancient Power clone which briefly became a Flying coverage move, Shadow Claw, a decent coverage move that is the strongest Physical Ghost-type in this generation and the next one, and Shadow Sneak, a famous Ghost-type priority move which sadly has no Quad Weakness to abuse in this generation, and outside of Psychic/Ghost, none. Shadow Claw is a quite funny move as well, as the second strongest normal Ghost-type in this generation, Dusknoir, did not get it, while only Banette got it in the Shuppet-line.
The next generation, fifth generation, introduced a fair amount of powerful but low BST Ghost-types, Golurk, Cofagrigus, and Chandelure. Sadly, none of them had much of chance due to abundance of Dark-types in this generation, and due to their low BST, which despite their large stats made them weak in comparison. Jellicent, a Tentacruel clone with lower BST and stats, managed to escape this fate briefly by matching up with Ferrothorn.
This generation introduced two new Ghost-type abilities, Cursed Body, which worked like Cute Charm for Disable and Mummy, which was an Ability that forced itself on other Pokémon. Infiltrator was also given to Spiritomb, and the ability would be later given to other species, most notably Litwick-line over their unreleased Shadow Tag ability. Due to introduction of Eviolite, a few species gained some cult status in lower tiers, but after Knock Off buff in the next gen, this was rendered largely useless.
In this generation, the type only got Hex, a Payback clone but for species that already had status. This made a nice combo for many species, and it had distribution outside of the type as a coverage move. Also notably the Rotom forms got different types than Electric/Ghost, rendering most of them useless.
In this sixth generation there were only three lines and Hoopa. All of the Ghost-types in this generation besides Trevenant got a form for some reason, with different varying degrees of quality. Ghost-types got a decent amount of Megas, but some species that needed them didn't get them, and Banette and Sableye's Megas were effectively replacements for a proper evolution. Fairy's introduction also made Dark/Ghost no longer the sole type combination with no weaknesses, rendering the combination irrelevant.
The type got a few moves like Phantom Force, a gimped version of Shadow Force that became available for most physically oriented Ghost-types except Dusknoir, again, Trick-or-Treat, an odd signature move that makes Three types canon, and a Hex buff to make it a Venoshock clone. The few broken Ghost-types did not fix the type in the slightest however.
In the seventh generation, due to region's basis off Hawaii, there were a quite a few Ghost-types introduced in this generation, the largest amount of new lines in the entire franchise history. One was the starter, other was the second mascot legendary, one was the second mythical, the other was a form, and the remaining were odd Ghost-types with odd moves and types. Mimikyu became the most prominent one of them, due to its unique ability, type, design and movepool.
The few new abilities introduced were not unique to the type, but rather to species. However, most of the species introduced here belonged to rare or new type combinations, giving the type a breath of fresh air.
The moves were similar in fashion, as all of them were signature moves, and unlike the previous gen, there wasn't any new buffs.
The Overview of Ghost-types:
Ghost-types are one of the few types in the franchise that are held back by the characteristics of the genre, rather than the type itself. This causes people to believe Ghost-type is really a good type on paper, but that statement is very debatable for now. The primary reason why Ghost-types suffer is simple, in most JRPGs zombies and ghouls are mid-game enemies or bosses, not common enemies, nor enemies that appear in variety of end-game dungeons. Because of this, Ghost-types are rarely seen in the end-game, and when they are, they generally have the stats of a mid-game species, as in JRPGs zombies are often cleared by gimmicky strategies, which Ghost-types replicate.
It is possible that Ghost-type is truly a great type that just needs powerful moves and species, but even then Ghost-types suffer because their offensive interactions are too similar to Dark-types, which have far more neutral coverage and a wider selection of moves, both offensive and status. While Dark-types are notably weaker, in terms of coverage they are always chosen over Ghost-types due to their ability to hit Normal-types and being resistant to themselves, unlike Ghost-types.
As undead species, Ghost-types do not have much of a chance as a defensive type. Many of them have too few of a HP, as spirits do not have flesh which renders moves like Pain Split an absolute but gimmicky necessity that serves more to damage the opponent than to heal the Pokémon, and since revives kill zombies, they generally do not have standard healing moves, and their defensive variants do not have the power to abuse drain moves, if they even have access to Drain moves.