1) Ditto the "The Works" as recommended by Chief RA. Also does fantastic as removing tannin stains from the hull. I've attached a pic of how it cleaned the tannin from my hull the first time I used it. No scrubbing. Just a couple of applications with a sponge wetted with "The Works". I also use it for 1) removing rust stains from sails. Just dab it on with a brush over the rust stain. Might take a few applications, but the rust will disappear. 2) Wiping over my entire hull before the annual waxing. It seems to restore much of the white. My theory is the oxalic acid dissolves mineral and scale deposits.
I get mine at Dollar Tree. Here is a url link to show what to look for.
https://www.dollartree.com/The-Works-16-oz-Tub-Shower-Cleaner/p6065/index.pro
2) But another observation: Where are the gelcoat rust stains coming from? Usually will be from stainless steel fittings' rust that has leached around and into the adjacent gelcoat. Or from water constantly dripping off rusted stainless steel fittings or from standing rigging. If this is the case, then the SS also should be treated. As reviewed by Mainesail a number of years ago, "Spotless Stainless", does wonders restoring old rust tarnished stainless to rust free. With citric acid as its active ingredient, a layer of passivation is imparted which inhibits the rate of re-staining with rust. Oxalic acid will remove rust stains from Stainless Steel. But leaves the surface unprotected and prone to fast re-rusting.
Spotless Stainless will remove gelcoat rusts stains as well. It's a tad on the expensive side. But it is a product that in fact works. Been using it myself for about 7 years now. And I re-order when I run out.