Alolan Muk: Gengar's STAB attacks do virtually no damage to Alolan Muk due to its great bulk on top of its Dark and Poison typing resisting both of them. Muk, on the other hand, can bring Gengar down to its Focus Sash with Knock Off, and then potentially follow up with a Shadow Sneak. If not, it can simply just finish Gengar with a clean second Knock Off.
Faster Pokemon: Anything holding a Choice Scarf, such as Garchomp, can easily outspeed and bring Gengar to its Focus Sash. Garchomp in particular can also switch in on any of Gengar's attacks without taking too much damage. Other fast Pokemon, such as Tapu Koko and Aerodactyl, don't even need a Choice Scarf to outspeed and damage Gengar.
Trick Room: Gengar's great Speed can become its largest weakness once Trick Room goes up, as attackers can take full advantage of Gengar's little bulk. Snorlax and Araquanid deserve a mention as well as Knock Off from Hariyama and Eruption from Torkoal will bring Gengar down to its Focus Sash if it has one.
Special Walls: Gengar severely struggles against Pokemon that can sponge its hits and do decent damage back to it, such as Porygon2, Snorlax, and Araquanid. The latter two also have the ability to bring Gengar down to its Focus Sash, whereas Gengar can 3HKO Araquanid at best. In addition, Celesteela can easily hold its own with Gengar, even if it is Taunted.
source
Yveltal: Unlike other Dark-types, Yveltal can viably run Revelation Dance and takes neutral damage from Secret Sword. Thus, it is able to check almost every variant of Mega Gengar when healthy, though it may be overwhelmed by Tail Glow-boosted attacks. Normalize Mega Gengar can also overpower Yveltal with Shell Smash-boosted Boombursts after Stealth Rock damage. Assault Vest and Unaware variants avoid concerns about boosted Mega Gengar if it lacks sleep-inducing moves and effectively handle Mega Gengar.
RegenVest Walls: RegenVest users tend to struggle against Normalize Mega Gengar if lacking Revelation Dance, but Pokemon like Primal Kyogre and Dialga can defensively check setup variants of Mega Gengar. They are particularly hard to wear down due to their ability, and Mega Gengar is forced to rely on excessive prior damage or multiple layers of hazards to surmount them. However, all of them are neutralized by Spore and Entrainment and will struggle to immediately take down Mega Gengar using Quiver Dance. Some of the RegenVest walls like Dialga are vulnerable to boosted Secret Sword as well.
Primal Kyogre: Although it does not resist Judgment, Primal Kyogre's massive special bulk allows it to tank boosted hits when running a RegenVest or Unaware set. A majority of Primal Kyogre variants also run Revelation Dance, meaning it is a good blanket check to Normalize variants as well. Note that Primal Kyogre lacking Spectral Thief will struggle to check Mega Gengar running Quiver Dance due to the Special Defense boost.
Priority Users: Priority users like Aerilate Mega Rayquaza and Refrigerate Kyurem-B can easily revenge kill Mega Gengar lacking Dazzling or Queenly Majesty by using Fake Out and Extreme Speed, bypassing its high Speed. Although they dislike switching into Judgment, they can take out any variant of Mega Gengar after Stealth Rock damage. Though King's Shield remedies issues with -ate to a degree, the move itself is quite difficult to fit in the first place and Triage Mega Rayquaza can still revenge kill Mega Gengar.
Chansey: Chansey's enormous special bulk makes it a strong check to Mega Gengar, shutting down sweep attempts unless Mega Gengar is overly lucky with sleep turns or has a combination of Mold Breaker and Secret Sword.
Magic Bounce and Comatose Users: Foes with Magic Bounce or Comatose such as Zygarde-C and Registeel cannot have their abilities removed by Entrainment and can check Mega Gengar, given they can handle Judgment. They can also harshly punish Mega Gengar by bouncing back Spore from setup variants, if Mega Gengar lacks Mold Breaker.
Faster Foes: Faster threats like Mega Mewtwo Y can easily outspeed and KO Mega Gengar, though they will be KOed back if Mega Gengar has Focus Sash and cannot take on Mega Gengar if it is boosted by Shell Smash and Quiver Dance.
Poison Heal Regigigas: Regigigas has enough bulk to survive a +2 Secret Sword from Shell Smash Mega Gengar from full health and can OHKO back with Knock Off or Spectral Thief. It can also shut down Normalize Mega Gengar with a sleep move, which it commonly carries.
Pursuit: Mega Gengar's tendency to retreat from bulky Dark-types like Mega Gyarados and Mega Tyranitar due to its frailty and resulting hazardous matchup against them, depending on its moveset, makes Pursuit one of the viable methods to guarantee its removal or at least leave it heavily damaged. They may struggle trapping Normalize variants, but they can also use Trick to throw a wrench in the matchup and cripple Mega Gengar.
Item Removal: Knock Off not only hits Mega Gengar super effectively but also removes Spooky Plate, leaving Mega Gengar nearly useless and unable to take on its own Imposter. Trick and Switcheroo can also cripple Mega Gengar by removing Spooky Plate.
source