Females cannot be priests. Therefore lesbians cannot be priests. Those men who feel they have strong attractions to men are told that they cannot be priests. Those who are openly gay definitely cannot become priests. If someone who is already a priest commits a sexual act then he must repent. If he does not repent and plans on doing it again then he is breaking his priestly oath (e.g. a priest falls in love with a woman and they are planning to continue being intimate). At this point he would be stripped of his priestly duties. Defrocking is the long next step, I believe - just as it is a long process to become a priest.
There are so many extra-biblical precepts in the Catholic church it's sometimes confusing as to the way the bible is viewed.