People can be so rude!
If you want to stop painting his nails, perhaps start teaching him about nail upkeep. Skip the color yourself for a while and start buffing and polishing with one of those 4 part cube shaped buffers you get at Target for $2. You refine, buff, and shine your nails into looking like they have a shiny clear coat on them. Make sure his nails are trim, even, and clean underneath. Your children will follow your lead. It doesn't mean that he is or isn't gay because you paint his nails. He wants to do what his mommy does because he adores his mother. But again, if you are concerned, then switch it up. If you want it to stop (this is 100% your decision, so don't let anyone pressure you), then explain to him the non color version of nail care. When it comes down to it, it's all about pride in appearance, right?
You know, even my hubby likes a home mani-pedi. He soaks his feet, he scrubs them and rinses them. One of us gets out the peppermint foot lotion. We clean and file the nails/trim them, and then I go to town with the buffer. My hubby has the prettiest toes, paint free. And then we do mine. And then, it's fingernails time. We like the more natural look for us anyway, but really...a clean, well kept set of hands and feet are something to be personally proud of. Again, IF, and I say that with a big I-F, you are wanting to switch from polish to no polish, move into personal grooming. If you don't care but want a more masculine color, try some nudes. There are also matte polishes, now, too. And if you don't care at the moment, then do as you will and realize that a good portion of people are just...well, plain rude. There isn't much you can do about that except to teach your little one that that kind of behavior is damaging to yourself and those around you and is not acceptable. If you are teaching him this while you are out and about, especially while someone is being rude to you, it will drive your point home and teach your son a lesson on patience, propriety, and self esteem all at the same time.
Hey, aren't there alot of boys who paint their nails black and blue and purple and green, anyway? Something about the punk rock style?