The canonical basis for this discussion is canon 915: “Ad sacram communionem ne admittantur excommunicati et interdicti post irrogationem vel declarationem poenae aliique in manifesto gravi peccato obstinate perseverantes.” That is, “Those who have been excommunicated or interdicted are not to be admitted to holy communion after the imposition or declaration of the penalty, and others who are obstinately persevering in manifest grave sin.”
The priest in question did not handle this matter properly. He definitely should have investigated the matter further before proceeding as he did. Finding out about a person’s sinful lifestyle from a single individual does not make that lifestyle “manifest”. Besides, the source may have been in error. And even if the person told the priest: “Ms. X is a practicing lesbian, and everyone here knows it”, he still should have confronted Ms. X directly to find out whether she was truly obstinate.
As for the comment that appeals to the example of Our Lord giving the Holy Eucharist to Judas, it should be remembered that Judas’s sin was not manifest at the time, nor had he been accused by any of the other Apostles. They hadn’t a clue of Judas’s intentions at that time. Hence, the comparison does not hold up.