Yes fish do urinate. Like birds they dispose of their wastes through one exit only. Human are able to hold urine in their bladder since it is in the form of urea which is not so toxic. While fish excrete ammonia, which is toxic and therefore excrete it with their fecal matter.
If you are seeing your fish expel stuff out of its gills, that might be a bad thing. The only fish I've seen expel matter out of its gills are my loaches when they filter feed through the sand. They expel the sand out of their gills. Regular fish, all I know is they spit it back out of their mouths. I've never witness regular fish expel through their gills before.
Was the things shooting out of the gills, or was it clinging onto the gills? If its the latter, that actually might be a parasites.