Can you post a picture of the fish?
The first thing you should do if any fish looks sick, stops feeding or dies in a tank, is a 75% water change and complete gravel clean. This does two things.
1. It dilutes any harmful chemicals like ammonia, nitrite, nitrate, aquarium plant fertilisers or chemicals that got into the water from outside the aquarium.
2. It dilutes the number of harmful disease organisms in the water and buys you time to identify the problem and start treatment.
Even if the water is "good" or "where it should be", a big water change and gravel clean will usually help. On top of that if you do a big water change and gravel clean before treating a tank, you remove most of the rotting organic matter from the substrate and that leaves fewer microbes in the tank, and that means any medication you use, can go towards treating the fish instead of killing the bacteria living in the gunk in the gravel.
It's also a good idea to use a clean soap free sponge to wipe the inside of the glass. This removes the biofilm and reduces the number of micro-oganisms in the tank allowing the medication to focus on the fish.
----------------------
Carbon should be removed from any filter before adding a medication. If the carbon is in a filter pad, you can cut a small slit in the filter pad and tip the carbon out and throw it away. Then put the filter pad back into the filter so you don't lose the beneficial filter bacteria living in and on the pad. If the pad is dirty you can squeeze it out a few times in a bucket of tank water before putting the pad back into the filter.
----------------------
What medication did you get?
Do not use Melafix or Pimafix on labyrinth fishes like Bettas and Gouramis. It can leave an oily film on the surface and kill them.
Please post a picture of the fish and tell us what medication you got. If you got an anti-fungal medication and the problem is bacterial, the treatment will not work. And anti-bacterial medications won't work on fungal infections, and most antibiotics will kill filter bacteria and cause water quality issues.
And do a big water change and complete gravel clean while we wait for the picture. Leave the fish in the tank and use a gravel cleaner (like the one in the link below) to remove some water and clean the gravel. Make sure any new water is free of chlorine/ chloramine before it is added to the tank.
http://www.about-goldfish.com/aquarium-cleaning.html
----------------------
To work out the volume of water in the tank:
measure length x width x height in cm.
divide by 1000.
= volume in litres.
There is a calculator/ converter in the "How To Tips" at the top of this page that will let you convert litres to gallons.