If you are not homosexual in your waking life and dream that you are homosexual represents a union with aspects of yourself. It is symbolic of self-love, self-acceptance, and compassion. If you are uncomfortable with homosexuality in your dream, then it suggests some fears or anxieties about femininity (if you are female) and your masculinity (if you are male). You may be experiencing some insecurity in your relations with the opposite sex.
To dream that the guy you like in real life is gay represents your anxieties and fears that he won’t like you back. By seeing him as gay, then it would be easier for you to dismiss your feelings for him because you have no chance with him. On a side note, it is common for expectant fathers to have dreams of homosexual encounters. Conversely, dreaming that you are in a relationship with someone who is homosexual in real life implies that you are looking for specific qualities as represented by this person. Alternatively, being in a relationship with a homosexual person means that you are looking for something unattainable in your current relationship.
If you are homosexual in your waking life, then the dream is simply a reflection of your own self.