The simplest connection seems to be one of "marginality" or "disempowerment". Both race and sexuality serve to define group identities which are suppressed by the culture at large. The two groups then share a struggle - to be given value, merit, and (positive) recognition.
If a person's deepest feelings and most obvious, outward definitions (of identity) are not valued by the culture at large, that person is marginalized by the culture, essentially by default.
That person's truth, so to speak, is not recognized by the world in which that person lives and in which he/she must find a way to survive (without succumbing to the personal and cultural forces that would remove all validity from his/her identity).
A more difficult connection might focus on looking at desperation - and the actions derived therof - in both groups.
Well, in this novel, the way I perceived it anyway, was that truth is not ambiguity as the authors of the beat movement would have you believe, but rather that to understand what truth and reality are, altruistically, one must first recognize, that these lineations exist, then overcome them, for purer realization of what truth is. What I'm trying to say to you is that homosexuality, and race, although they are ultimately insignificant, in the eyes of omnipotence, they are not insignificant in the eyes of society.