Berachos Daf 32
ואמר רבי אלעזר: מיום שחרב בית המקדש ננעלו שערי תפלה, שנאמר: ״גם כי אזעק ואשוע שתם תפלתי״. ואף על פי ששערי תפילה ננעלו, שערי דמעה לא ננעלו, שנאמר: ״שמעה תפלתי ה׳ ושועתי האזינה אל דמעתי אל תחרש״.
On the subject of prayer, Rabbi Elazar also said: Since the day the Temple was destroyed the gates of prayer were locked and prayer is not accepted as it once was, as it is said in lamentation of the Temple’s destruction: “Though I plead and call out, He shuts out my prayer” (Lamentations 3:8). Yet, despite the fact that the gates of prayer were locked with the destruction of the Temple, the gates of tears were not locked, and one who cries before God may rest assured that his prayers will be answered, as it is stated: “Hear my prayer, Lord, and give ear to my pleading, keep not silence at my tears” (Psalms 39:13). Since this prayer is a request that God should pay heed to the tears of one who is praying, he is certain that at least the gates of tears are not locked.
What are these Gates of Tefillah and Tears? For that matter, why do we even bother praying, if the gate is locked?
Furthermore, we know that Tefillah took the place of the Korbanos. If the Korbanos ceased with the Churban and along with that, the Gates of Tefillah were locked, what is the point of the Tefillos?
Rabbeinu Bachye (Bereshis 1;18) explains that the Tefillah is indeed in place of a Korban, however, accompanying the Korban there was always the Nisuch HaMayim, pouring of water on Mizbeach. He explains that when we are mispallel with tears, we are representing the Nisuch Hamayim. This represents the Sefira of Chesed and the Yemin, which is where the Shaarei Teshuva are.
Rabbeinu Bachye explains further (Shemos 22,20) that for this reason one should be careful with a Ger, Yosom or Almana as they tend to cry more, and therefore their Tefillos are heard first.
We also see that the Shaarei Dimah and Shaarei Teshuva are perhaps the same. The Midrash in Devarim Rabba 2 tells us that while the Shaarei Tefillah are sometimes open and sometimes closed, the Shaar Teshuva is never locked, as whomever wants to do Teshuva is welcomed in.
The Arizal teaches us (Shar Mamarei Rashbi) that the Shaarei Tefillah are in the Sefira of Binah. This was the level Moshe Rabbeinu was on when he was davening after the Cheit HaEgel. There is a lower rung where Tefillah is accepted and that is through the Sefira of Chesed, in the Shaarei Teshuva and Dimah.
Furthermore, we saw in the Midrash that the Shaar Tefillah is not always locked, when is it open?
The Shaarei Orah (Shaar 2 – Sefira 9) tells us that the Shaar Tefillah is always open for the Tefillos of a Tzibbur. However, for the Tefillah of a Yachid, it is not so clear cut. He goes on to give us a very vivid explanation as to the back end of a Tefillah:
There is a Tefillah quality assurance system manned by Angels, wherein every Tefillah that an individual says goes into a special Heichal and and is reviewed. If the Tefillah is found to be befitting, it is brought up to Hashem. If it is not a proper Tefillah, it is called a Tefillah Pesula and the Tefillah and all its contents are called Pesilim. These are pushed out of the Heichal and the doors shut behind it. The Shaarei Orah explains that based on this, we find most of our Tefillos are Pesilim and as we brought up earlier, it seems they are going to waste. He explains that all these Tefillos that were pushed away Hashem gathers them to a special place where they are kept for safekeeping. When one is Mispallel properly with the right Kavana, the Kosher Tefillah then goes up to this special place and brings along with it all the Pesilim, straight up to Hashem.
If one does not do Teshuva and does not daven with proper Kavana, these tefilos are pushed further out and the doors to the Shaarei Teshuva are shut.
However, there is still another door, the Shaarei Dimah. These are opened 3 times a day by Hashem Himself and when a person does Teshuva and is Mispallel with tears, his Tefillah and tears will go straight to Hashem.
We see that the Shaarei Teshuva and Shaarei Dimah are not necessarily the same thing. The Shaarei Teshuva can close too, but the Shaarei Dimah will never close.
Reb Tzadok takes this a step further and explains that if one is mispallel a heartfelt Tefillah, not only does it go straight to the Kisei HaKavod, but any similar Tefillah that was said by his ancestors, without proper kavana, latches on to his Tefillah to go to Hashem. The Radomsker (Tiferes Shlomo, Vayera) says similarly, that with the correct Kavana you are elevating the unfit Tefillos of your previous gilgulim.
May we all merit to have our Tefillos brought before Hashem and answered for our best.