The technical loophole here is that there is not a ban on gay men giving blood. The provision states that you are disqualified if you are a man who has had sex with another man at any point from 1977 forwards. Therefore, you could be a donor if you have never engaged in anal sex during that period – there are many gay men who might very well qualify.
Of course, practically, this acts to exclude a large majority of the gay male population. Additionally, it is both over and underinclusive. Both of these points tend to show that the policy is discriminatory, and not for practical purposes.
If the reasoning behind the policy is to reduce the possibility of contamination from people who engage in high-risk behavior, there are several problems:
(1) It does not separate receptive anal sex out. Active parties in anal sex are at a much lower risk – it is the receptive behavior that is “high risk.”
(2) It does not separate out unsafe vs. safe sexual behavior.
(3) It does not separate out those with multiple sexual partners from those with minimal partners.
(4) It does not eliminate women who have had sex vaginally. The vast majority of HIV infected women become infected due to heterosexual sex. Considering that tops have 1/10th the risk of bottoms, this makes men who are strictly tops or almost always tops in anal sex statistically similar to women who are infected through heterosexual sex.
What we really should be asking about, therefore, is what kind of at-risk behavior the people have engaged in.