First off, females will be bigger than males. Secondly, if the fish is over a year old, males will have these white bumps on their gills and females vents will enlarge will look out-turned. Look at this link to see if your goldfish is a sexually mature male or female.
Sexing Goldfish