First of all, welcome to Fishlore!
To answer your questions in an unspecific order:
The most common worm-like thing that lives in freshwater aquaria are called planeria. They're harmless, though they are an indicator that there's too much food in the tank (usually from overfeeding, though there are a few other ways). This may not be what it is, but it would be my first guess.
If you do medicate the tank, do not use Melafix or Bettafix. These are bad for gourami.
What are the water parameters (
ammonia,
nitrate,
nitrite,
pH, temp) in the tank? How many glofish, how many of the other little fish?
Does the gourami have clear or white, stringy poo? If so, this would be a sign of parasitic infection.
Does the gourami, or any of the other fish, appear to have anything attached to them? This again would be a sign of parasites.
It is possible that your gourami has been infected with iridovirus. It's a nasty, nasty virus that seems to infect gourami and bettas really easily. The first symptom is that they lose their appetite. They then become sluggish and eventually seize and die.
Whatever the problem is, make sure the water quality is pristine (do a small extra
water change every day, if you can), feed them the highest quality food (OmegaOne is a good choice), use VitaChem and GarlicGuard (or just garlic juice) if you can get your hands on them, and keep a close eye out for changes.