I'm straight, but have many connections to the gay and gender communities through work and friends. I've found two ways to deal with being "accused" of being gay.

1) If it's a woman, "I'm not, but you don't have to take my word for it."

2) If it's a guy, "Please. Don't flatter yourself."