Hi, Nathan. From the research I've conducted, having Hocd means you're probably not gay, but have certain "impulses" that make you question that. There's a lot of controversy about whether or not homosexuality is a sin; I'll let us (and God) decide that for ourselves. Regardless of whether it is or isn't, I'd like to point out that our morality doesn't appear to be determined by our thoughts, but by our actions. Many of us are tempted to lie or steal, but if we choose not to, I don't think we have sinned. Jesus himself, who was said to be without sin, was notably tempted by the devil - but he resisted the urges.
As for Hocd itself, I found a website that claims it is best treated with "Cognitive behavioral therapy" (CBT), a form of treatment that focuses on examining the relationships between thoughts, feelings and behaviors. The site also has a questionnaire that can help determine how many symptoms of Hocd you have. Plus, there are many pages that can begin helping you work through your condition, and a phone number and email address to contact experts. I can't link to the website itself (Hubpages says the link is not allowed), but if you type "OCD Center of Los Angeles" into Google, it'll be the first result to come up. I'm wishing you all the best.