Was Soap a comedy? I may have seen it and liked it, iirc.
Yup. Billy Crystal's big break.
He played Jody, the first openly gay major character on a TV show. And no, Dr Smith on Lost in Space doesn't count.
Concurrently and much more obviously gay: Uncle Arthur played by Paul Lynde
I thought of that, but Uncle Arthur was not formally recognized by the show as being "openly gay". Paul Lynde, the actor, (with the
gay voice 
) was widely assumed to be gay, even though he never formally admitted it. The TV networks were not ready for openly gay people back in the '60's. I believe Gene Roddenberry had ideas for a gay character on
Star Trek, but the producers refused.
Was Dr. Smith gay? I never got that. I was only a sporadic viewer, liking only the Robot, and the characters played by Billy Mummy and Angela Cartwright. Everyone else was just a snooze for me and I’d go back to reading if they weren’t on screen. The actor was not gay afaik.
Uncle Arthur was not explicitly gay—no one was on tv in those days— but if I had known that there was such a thing as gay, I would have instantly realized Uncle Arthur was gay. Paul Linde was gay although not publicly acknowledged as such. Agnes Moorehead was rumored to be gay or bi.