Krzysztof Charamsa thanked Pope Francis for his positive words and gestures but criticised what he called the Vatican's hypocrisy in banning gay priests even though he said the clergy was "full" of homosexuals.
"Have a minimum of mercy. At least leave us alone, allow civil societies to make our lives more human, while you, with your church, have managed to make the lives of us homosexuals a hell," he wrote in the letter dated October 3th, seen by AFP on Wednesday.
Charamsa sparked outrage at the Vatican that day by publicly declaring his homosexuality -- and presenting his Spanish boyfriend Eduardo Planas -- on the eve of a bishops' synod which touched on the divisive issue of the Church's relationship to gay believers.
A Polish bishop last week defrocked the 43-year-old priest for failing to abide by his vow of celibacy.
Charamsa had held a senior position working for the Vatican office for protecting Catholic dogma, the Congregation for the Doctrine of the Faith.
He now lives in Barcelona in northeastern Spain with his partner.
Charamsa wrote that after a "long and tormented period of discernment and prayer", he had taken the decision to "publicly reject the violence of the Church towards homosexual, lesbian, bisexual, transsexual and intersexual people".
"Today I have put myself on the side of the fantastic homosexual people, who have during centuries been humiliated by a fanatical church," he added.
"All gay cardinals, bishops and priests should have the courage to leave this insensible, unjust and violent church.
"The church must stop sowing hatred against those who live in peace and love on this earth. The church, incapable of confronting humanity, must shut up if it is not capable to use reason," he added.
While Charamsa can no longer perform priestly duties, he has not been excommunicated, a move that would entirely banish him from the Catholic church.
The pontiff met a gay former student of his during his recent visit to the United States and has previously said that gay people should not be marginalised in society.
But a report adopted by Catholic bishops at the end of their three-week synod on Saturday includes only one brief article on the Church's approach to gay believers, framing the question in terms of how priests can help support families who have "persons with homosexual tendencies" in their midst.
The report strongly reiterates the Church's opposition to gay marriage, saying: "There are absolutely no grounds for considering homosexual unions to be similar or even remotely analogous to God's plan for marriage and the family."