In the present day east wall of the Har Habayis, around 200 feet to the north of the dome of the rock, is a sealed up double gate, called Sha'ar Harachamim-The Gate of Mercy. Through this gate, Moshiach is going to enter Yerushalayim. The Arabs put a cemetery right in front of it, and people say they did that so Eliyahu Hanavi, who is a Kohen, can't enter, because then he will become Tamei. (The Arabs didn't know that a kohen is allowed to walk over a non-Jewish grave, as long as he doesn't touch it. [Rambam, Hilchos Tumas Meis, a1:13)
But who made this gate? when? and why?
The Sha'ar Harachamim’s outer façade is composed of two blocked-up gateways adorned with intricately carved relief arches. The decoration of the arches to the front and back of the gate are identical to the applied arches of the Double Gate which date from the Early Islamic period. The gate appears therefore to have been rebuilt in the Umayyad period. But, inside it, the remains of two ancient doorposts can be seen. (see here) These doorpost, unlike the present Sha'ar Harachamim, which juts out of the wall, is on the same line as the wall, so it seems that it is from the same time. This part of the eastern wall of the Har Habayis, is from the the eastern Migrash of the first Beis Hamikdash, so that means that these ancient doorposts, and the gate that was in between them, are from the first Beis Hamikdash too.
These doorposts have a recess cut out of them, to fold the doors into when they were open. The northern doorpost is 4.5 meters (approx. 9 1/2 amos) tall, and the southern one is 3.5 meters (approx. 7 amos) tall. The distance between the two doorposts is 8.5 meters (approx. 18 amos), which is too wide for one gate, so it must have been a double gate. (For a drawing showing this gate in all its stages, see here.)
In 1969 (5729), a student at the American Institute of Holy Land Studies, James Fleming, who was exploring the area in front of this gate, fell into a grave in front of it. Looking up, he saw an arch under the gate. He suggested that it was a pre-Herodian gate, from which a tunnel led to ground level inside. However, the bedrock rises up very steeply here, so there isn't any room for a tunnel. Also, the arch stones look Herodian. Therefore, Leen Ritmeyer says that the arch supported a staircase to this gate, and this staircase might still be there today, under the Arab cemetery.
Around fourteen meters in front of this gate, Charles Warren discovered a thick wall, that turned to meet the end of the gate. This was the eastern city wall of Yerushalayim, and in this area it had a gate, Sha'ar Hamifkad (Nechemiah 3:31.)
(this article, until here, is based on, The Quest, pp 108-110, and an article on Leen Ritmeyer's website)
Now we need to figure out what this gate was made for. The Kaftor Vaferach says about this gate,
ולצפון הפתח הסגור אשר במזרח שאמרנו עליו שהוא שער שושן כמטחוי קשת, יש בכותלו שני שערים גבוהים מאד בכיפות מחוץ, ודלתותיהם ברזל והם סגורים לעולם, וקורין להם ההמון שערי רחמים. והישמעאלים הורגלו בזה וקורין להם בא״ב אלרחמ״א. ומסתברא שהם אותם שני שערים שעשה שלמה לגמול חסדים אחד לחתנים ואחד לאבלים ומנודים כמו שנזכר מסכת סופרים (פ״כ) [פי״ט] (הי״ב) רבי אליעזר בן הורקנוס אומר ראה שלמה כת של גומלי חסדים ובנה להם לישראל שני שערים אחד לחתנים ואחד לאבלים ומנודים, בשבת היו מתקבצים יושבי ירושלים ועולין להר הבית ויושבין בין שני שערים הללו כדי לגמול חסדים זה לזה. ושמא לזה קורין להם קצת שערי רחמים. [כפתור ופרח, פרק ו'.]
And to the north of the blocked up gate in the east, that we said that it is Sha'ar Shushan, around two arrow shots away, there is in this wall two very tall gates with domes on its outer side. The doors of these gates are iron, and they are always closed, and people call them the gates of mercy, and the Arabs are used to this, and call them "Bab Alrahama". And it makes sense that these are two gates Shlomo made for people to do Gemilas Chasadim, one for chassanim and one for mourners and people in Cherem, as is mentioned in Maseches Sofrim 19:12. "Rabbi Eliezer Ben Hyrcanus said: Shlomo saw the greatness of those who bestow lovingkindness, and built two gates for Israel, one for bridegrooms and the other for mourners and excommunicated persons. On Shabbos the inhabitants of Jerusalem used to congregate, ascend the Temple Mount and take their seats between these two gates to show kindness to these persons."
These gates are also mentioned in Pirkey D'Rabbi Eliezer, end of Perek Yud-Zayin:
ראה שלמה שמדת גמילות חסדים גדולה לפני הב"ה וכשבנה בית המקדש בנה שני שערים אחד לחתנים ואחד לאבלים ולמנודים והיו ישראל הולכים בשבתות ויושבין בין שני שערים הללו והנכנס בשער חתנים היו יודעין שהוא חתן והיו אומרים לו השוכן בבית הזה ישמחך בבנים ובבנות והנכנס בשער האבלים והיה שפמו מכוסה והיו יודעין שהוא אבל והיו אומרין לו השוכן בבית זה ינחמך והנכנס בשער האבלים ולא היה שפמו מכוסה היו יודעין שהוא מנודה והיו אומרין לו השוכן בבית הזה יתן בלבך לשמוע דברי חביריך ויתן בלב חבריך לסלוח לך ויקריבוך אצלם כדי שיצאו כל ישראל ידי חובתן בגמילות חסדים.
Shlomo saw that the observance of loving-kindness was great before the Holy One, blessed be He. When he built the Temple he erected two gates, one for the bridegrooms, and the other for the mourners and the excommunicated. On Shabbossim the Yidden went and sat between those two gates; and they knew that anyone who entered through the gate of the bridegrooms was a bridegroom, and they said to him, May He who dwells in this house cause you to rejoice with sons and daughters. If one entered through the gate of the mourners with his upper lip covered, then they knew that he was a mourner, and they would say to him. May He who dwells in this house comfort you. If one entered through the gate of the mourners without having his upper lip covered, then they knew that he was excommunicated, and they would say to him, May He who dwells in this house put into your heart (the desire) to listen to the words of your associates, and may He put into the hearts of your associates that they may draw you near (to themselves), so that all Israel may discharge their duty by rendering the service of loving-kindness.
In Shevet Yehudah, [Shmad 64] he brings a letter from Marcus, the Roman governor of Eretz Yisroel, (possibly Marcus Ambivulus, who was governor in the years 9-12, but more likely, Marcus Antonius Felix, who was governor in the years 52-58) describing the Beis Hamikdash. in part 7 of that letter, he writes that the door for the mourners was made out of black Yashfeh, (probably Jasper), and the one for Chassanim out of white glass.
Now, many Sefarim ask why the Mishna (Middos 1:3) doesn't count these gates among the gates of Har Habayis. You could answer, that since they are below the floor level of Har Habayis (even nowadays), and tunnels led from them to the top of Har Habayis, the Mishnah doesn't count them. But, based on what I said about the location of the square Har Habayis, it turns out that the tunnels from this gate led to the northern Migrash, not to the real Har Habayis, so the Mishnah doesn't count them. From the Migrash, they probably used Sha'ar Tadi to get into the Har Habayis, like the Tiferes Yisroel (Middos 1:27) writes. (Even though he is misquoting the Shiltey Hagibborim, he still said the right thing somehow .)
Here are some pictures of how Sha'ar Harachamim probably looked in the times of Hurdus.
I have added a new video of the Lishkos on the northern side of the first Beis Hamikdash..
My name is Mendel Lewis.
Hashem said to Yechezkel, "Its reading in the Torah is as great as its building. Go and say it to them, and they will occupy themselves to read the form of it in the Torah. And in reward for its reading, that they occupy themselves to read about it, I count it for them as if they were occupied with the building of it. (Tanchuma tzav 14)