I'm not a very religious person, but I am a spiritual one to the degree that I trust God over and above seen circumstances; I have the faith in Jesus' teachings, life, work, ministry, and His very Person to help me navigate through life. Therefore, even as a Christian, I do agree with Freud's assessment of "religion" as usually practiced in the institutional Church, as I do with Karl Marx' assertion that religion is the opiate of the masses.
We have certainly seen religion being used as a justification to deprive Gay people of their civil rights, and we have even seen those civil rights rescinded based on the prejudices of true believers and their gullible followers, both of whom, by definition, are neurotic because they seek to impose their own prejudices based on their own unmet needs and anxieties onto the electoral, rather than the Judicial, marketplace that they hope will justify the discrimination, the oppression, and the civil rights of others.
Regarding the origin of neurosis, Arthur Janov writes:
This separation of oneself from one's needs and feelings is an instinctive maneuver in order to shut off excessive pain. We call it the split. The organism splits in order to protect its continuity. This does not mean that unfulfilled needs disappear, however. On the contrary, they continue throughout life exerting a force, channeling interests, and producing motivation toward the satisfaction of those needs. But because of their pain, the needs have been suppressed in the consciousness, and so the individual must pursue substitute gratifications. He must, in short, pursue the satisfaction of his needs symbolically. Because he was not allowed to express himself, he may be compelled to try to get others to listen and understand later in life....
Neurosis is symbolic behavior in defense against excessive psychobiologic pain. Neurosis is self-perpetuating because symbolic satisfactions cannot fulfill real needs. In order for real needs to be satisfied, they must be felt and experienced. Unfortunately, pain has caused those needs to be buried. When they are buried, the organism goes into a continuous state of emergency alert. That alert state is tension. It propels the infant, and later the adult, toward the satisfaction of need in any way possible...The organism continues to live at any cost, and that cost is usually neurosis — shutting down unmet bodily needs and feelings because the pain is too great to withstand.
[For the full article, see here.]
When clergy and others seek to deprive dignity and civil rights to Gay people, that should be a red flag that these clergy are suffering from the pain and anxiety of unmet needs that occurred in their childhood and/or in their adulthood, that they feel require substitute gratifications for them that, unfortunately, takes the form of homophobia!
This anxiety and pain of their unmet needs are so great that any attempt is used by them to mitigate that suffering, so they resort to deflecting that pain onto others. As Carl Jung once observed: "The healthy man does not torture others - generally it is the tortured who turn into torturers."
So, strident homophobia must be seen as a red flag to all of us who seek to understand why those who claim to represent the Prince of Peace are so intent on bearing false witness against others (a violation of one of the Ten Commandments); are so intent on invoking some arcane verses of the Bible, the likes of which no rational person would seek to impose on contemporary society (e.g., stoning to death those who work on the Sabbath); resort to irrational attempts at justification for their homophobia, such as "preserving marriage" when no one who is rational can believe that same-sex marriage could or would in any way threaten or damage anyone's heterosexual marriage.
So the substitute gratifications needed and used by the homophobe because of his/her unmet or unfulfilled needs can be seen to prompt the irrationality of homophobia! The unmet or unfulfilled needs of the homophobe creates tremendous anxiety within him or her and he/she feels he/she must assuage that anxiety by condemning in others (often in the name of "love," of course) what may well be suppressed in him/herself, be it his/her own sexuality and/or other crucial needs not met at some point in his/her life; perhaps even in infancy.
It must be reiterated that sexually and emotionally healthy people don't seek to deprive Gay people (or anyone else) of their dignity and civil rights! Rather than externalize their likely lack of sexual and emotional health, it would be far better for them and for civil society for them to examine their own psyches and see what core needs of theirs have gone unmet; what gratifications they desired or currently desire can be met without their resorting to causing the suffering of their fellow Gay human beings and their families.
As I commented elsewhere: "People who hate, and who seek to deny dignity and civil rights to their fellow Gay citizens, show themselves to have psychological/sexual issues that make it necessary to relieve their anxiety that the very existence of Gay people provoke in them. It is the strident homophobes who hurt our society, and not Gay people who want and certainly deserve the same rights and privileges that heterosexuals enjoy under our Constitution."