I lived in the Castro, the gay mecca, for a couple of years. It was fun and perfectly safe. We had an epic meal last night in the Castro, at the Anchor Seafood restaurant. If they ever cook anything that's not magical, we haven't found it.
At the Folsom Street Fair, the heavy s+m event, I accidentally bumped into a giant bear-guy, huge and hairy and covered with leather straps and not much else. He spun around and said "Ok, ex-cuuuse me!" in a tiny squeaky voice. The boys are nice.
I met my wife in a gay bar here.
I seriously researched the USA for over six months, to restart my life, and picked SF. People said "but it's full of gay guys" to which the proper response is "and smart beautiful single women."
AIDS and now the work-from-home thing has changed the demographics; more crazy-dual-income breeders and dogs and kids. People meet at google or apple, get married, and move here. Work from home makes it easier to make and care for babies.
(New observation: are gay guys less inclined to have dogs?)
It's not a great place to hire engineers. Too many coders and MBAs.