As for the idea that “Y.M.C.A. is “somehow a gay anthem,” Willis said that “is a false assumption based on the fact that my writing partner was gay, and some (not all) of Village People were gay, and that the first Village People album was totally about gay
“This assumption is also based on the fact that the YMCA was apparently being used as some sort of gay hangout and since one of the writers was gay and some of the Village People are gay, the song must be a message to gay people. To that I say once again, get your minds out of the gutter. It is not.
...
I therefore wrote ‘Y.M.C.A.’ about the things I knew about the Y in the urban areas of San Francisco such as swimming, basketball, track, and cheap food and cheap rooms. And when I say, “hang out with all the boys” that is simply 1970s black slang for black guys hanging-out together for sports, gambling or whatever. There’s nothing gay about that.
I can reluctantly believe that is true (despite the laughable first paragraph where he gives example after example about why such "assumptions" are reasonable) - but he's old enough to know that once an artist puts art out into the world, their interpretation of it is no longer the only one.
The song IS a gay anthem even if it wasn't written that way.