Here's how it works:
* Gloomy is an adjective describing a feeling or state of being.
* Gloom is the abstract noun that represents that feeling or state of being.
You could say:
* "The weather was gloomy." (adjective)
* "The gloom of the room was oppressive." (noun)