IIRC a level of 2.0 ppm ammonia over time can/will be deadly to your fish! Do an emergency (at least 50%) water change and then keep up on water changes of like 25% every day until the cycle is complete. If your ammonia is that raised maybe your tank isn't fully cycled yet or you cleaned the filter and it has gone through a mini-cycle. The cycling process may take a few weeks.
Once the cycle is complete, ammonia and nitrite should be zero. Keep the nitrate levels under 40ppm to be safe.
Also, check to see if he has any issues with his gills. Ammonia can severely damage and burn them. He was probably gasping at the surface because of the ammonia. If he has any ammonia burns on his body aquarium salt can help him heal.