Well, I think that, like a lot of Church teachings, its all a little bit confusing and complicated. What we were taught is that if someone is born gay, its not their fault, so its not a sin (there was no choice involved). However, if they act on it, by say, sleeping with another guy/girl, etc, then its a sin. Impure thoughts, solo sex, etc. would also be sins. Thats why the Church, unlike some other demoninations, has no un-gaying programs.
It is def. true that priests can't be openly gay or have gay relationships. Of course, some still are, but thats a whole 'nother topic.