While recognizing the divine origin and force of the sex impulse in man, religion teaches that it must be controlled, and Bahá'u'lláh's law confines its expression to the marriage relationship. The unmarried homosexual is therefore in the same position as anyone else who does not marry. The Law of God requires them to practise chastity.
...Every believer needs to remember that an essential characteristic of this physical world is that we are constantly faced with trials, tribulations, hardships and sufferings and that by overcoming them we achieve our moral and spiritual development; that we must seek to accomplish in the future what we may have failed to do in the past; that this is the way God tests His servants and we should look upon every failure or shortcoming as an opportunity to try again and to acquire a fuller consciousness of the Divine Will and purpose.
Certainly the problem confronting you is a difficult one. However, its solution lies within your power, for Bahá'u'lláh has assured us that God "will never deal unjustly with anyone, neither will He task a soul beyond its power." And again, "Whensoever he hath fulfilled the conditions implied in the verse: whoso maketh efforts for Us, he shall enjoy the blessings conferred by the words: 'In Our Way shall We assuredly guide him"'. You can be confident that with the help of doctors, by prayer and meditation, by self-abnegation and by giving as much time as possible to serving the Cause in your community you can eventually succeed in overcoming your problem.
- The Universal House of Justice (From a letter dated 9 January 1977 written on behalf of the Universal House of Justice to an individual believer’; compilation: ‘Homosexuality’ prepared by the Research Department of the Universal House of Justice, 1993; Baha’i Library Online)