Notes: Gloom main niche is Strength Sap, being able to restore HP equal to the opponents Attack stat, while also lowering said Attack stat by 1. Sleep Powder for Sleep utility, dual STAB to heat opposing Grass types hard and Water/Ground/Rock types. Max Defence and HP to tank physical attacks from Dragons and Fighting types primarily.
Moonblast can be used over Giga Drain to beat Hakamo-o as well as more reliably handle the other dragons, but is often not neccessary if a different solid Hakamo-o check is present on the team.
Checks & Counters: Roselia can usually beat Gloom 1v1, due to higher Special Defense, access to Extrasensory and more reliable recovery. Vigoroth can also set up on Gloom if given a free switch-in. Fire types like Monferno, Combusken, Torracat and Magmar are also good checks, as they can threaten Gloom out with a strong Fire Move. Additionally, Kadabra and Haunter poses a huge threat, as they can both hit it hard on the special side while Gloom can't do much back.
Other Options: Moonlight and Synthesis can be used for more reliable recovery, but doesn't have the utility of Strength Sap and more often than not heals less than Strength Sap due to Glooms relatively low health. Stun Spore can also be used to cripple fast pokemons like Haunter and Kadabra, and Toxic can be used to wear down bulky pokemon like Dusclops. A Sun sweeper can also be used with Weather Ball and Solar Beam, but this requires Manual Sunny Day from either Gloom or a different pokemon, which is difficult to pull off.