Catholic Church is not condemning homosexuals. Why it should? According to Bible they were created by God, so they are good by definition. CC is condemning homosexual sex, in the same way as it condemns pre-marriage sex or killing other people. All those acts are done by people created by God, but given a free will to do the things that are wrong from the Church perspective. And that can be forgiven thanks do a deal that Jesus made with God.
As far as priests are concerned it does not matter much if they are gay or not as they should not maintain sexual relationships anyway.