If the fish is swimming upside down and clearly trying to swim the right way up, then it sounds a lot like swim bladder disease.
However, I have a Moonlight Gourami which does swim in an exceptionally different way to all my other fish. By this, I mean that he is often eating food from the bottom of the tank or nibbling on plants whilst swimming completely vertical, with his head downwards and his tail to the surface. If this is similar to what you're describing then I don't think it's anything to worry about.
thats what i thought as well, also a pointer towards ammonia poisioning
So, that looks like a Rainbow Dwarf. Possible DGD. Watch it for the next couple of days. If it does not improve, you should euthanize it.
Please do not buy Dwarf Gouramis. I swear, 75% of the ones I had bought over time got DGD.
Just to ask, what is dgd?
DGD is Dwarf Gourami Disease.
And I checked my ammonia which was 0. So I have no idea whatsoever what the problem is past it being DGD. Which is sad. I hate to euthanize the fish.