In the times of the Beit Hamikdash, a person who survived a potentially life-threatening situation brought a Korban Todah, a Thanksgiving Offering, to express his gratitude to Hashem. Nowadays, when the Beit Hamikdash no longer stands and offerings cannot be brought on the altar, we substitute a public proclamation of gratitude to Hashem for an offering. A survivor from a life endangering situation as defined by the Gemara recites Birkat Hagomel in gratitude.
- Some say that Birkat HaGomel is non-obligatory and only optional, however, others argue that it's an absolute obligation. Nonetheless, all agree that given the opportunity, one should be careful to make this bracha properly. 
Who is obligated to make Birchat HaGomel?
- The four people who are obligated to make the Bracha are
- Someone who was freed from jail
- Someone who was sick and was healed
- Someone who traveled at sea
- Someone who traveled in the desert. 
- Some say that anyone who was in near mortal danger such as someone saved from a wall collapsing, a lion attack, a goring ox, or a band of thieves at night, must make a Bracha. The ashkenazic minhag follows this opinion.  For specific situations, see a posek. 
- One who has been saved from multiple forms of danger only recites the bracha once. 
- For sickness that’s of potential mortal danger, Birkat HaGomel is required when healed. According to Ashkenazim, for sickness that’s non-mortal but confines a person to bed for 3 days or more requires a Brachat HaGomel when healed.  According to Sephardim, for any sickness which confines a person to bed for any amount of time requires Birkat HaGomel when healed. 
- A person who donated an organ does not say Birkat HaGomel with Hashem's name after healing from the surgery, however, one may say it without Hashem's name. 
- Ashkenazim hold that no Bracha is made for traveling from city to city unless there’s a lot of wild animals or thieves. However, Sephardim hold that any travel from city to city obligates a Bracha if the trip was a Parsah (72 minutes). 
- Some say not to make Brachat HaGomel for traveling on an airplane since it’s considered safe, however many hold that HaGomel is required and such is the minhag. 
For being let out of jail
- The Minhag Ashkenaz is not to make Birkat HaGomel for being let out of jail nowadays because of the lack of danger involved in staying in jail.  Nonetheless the Sephardic minhag is to make it for being let out of jail even if there was no danger in staying in jail. 
When it should be said
- Preferably HaGomel should be said within 3 days. If it can’t be done within 3 days it should be said within 30 days, and if it can’t be said in 30 says it should be said whenever one wants. 
- It’s preferable to say Birkat HaGomel within 3 days even if one will not be able to say it at a Kriyat HaTorah (in front of the Torah) rather than wait to say it later at a Kriyat HaTorah. 
Procedure of Birchat HaGomel
- The Bracha of HaGomel was established to be said before a minyan, preferably with two Talmediei Chachamim, and if there’s no minyan available one may not make HaGomel but rather should wait to find one. 
- The minhag is to say HaGomel after Kriyat HaTorah in front of the Torah. 
- The one reciting birkat hagomel should recite it while standing. 
- Those who hear the Birchat HaGomel being made should answer "שגמלך טוב הוא יגמלך סלה", which means "Hashem who bestowed upon you this good, should continue to bestow upon you other good tidings". 
- The Ashkenazic minhag is that women don’t make HaGomel  however some say that if a women who gave birth happens to be in front of a minyan, she may say HaGomel.  Sephardic women, however, do recite Hagomel. A woman who has the custom to recite it should wait seven days after giving birth to do so. 
Listening to someone else say HaGomel
- Someone who listens to someone else make HaGomel has fulfilled the obligation if one heard the entire Bracha. However, if the one making the Hagomel wasn’t obligated in the Bracha, someone who’s listening doesn’t fulfill the obligation unless one answers Amen. 
- Some are in doubt whether someone can fulfill the obligation of the person listening if the listener and the one making the Bracha have different reasons for obligation of the HaGomel. Rather, only someone who is obligated in HaGomel for the same reason should fulfill someone else’s obligation.  However, some argue that anyone who’s obligated in HaGomel can fulfill the obligation of someone else. 
- Vayikra 7:12
- The source of Birkat HaGomel is the Gemara Brachot 54b which states that one who has completed a sea voyage, traveled through the desert, has been sick and healed, or was imprisoned and freed should thank Hashem in the form of Birkat HaGomel all based on the pasuk “They strayed in the wilderness, in the desolation of the road… Hungry as well as thirsty… They rise heavenward, they descend to the depths.” (Tehillim 107:4,5, and 26). According to the Magen Avraham (OC 219:1), Birkat Hagomel, like the Korban Todah, is non obligatory but rather optional. The Peri Megadim (OC 219:1) argues that it is obligatory. Nevertheless, all poskim (Chasam Sofer O.C. 51, Minchas Yitzchok 4:11-9) urge one to be careful to fulfill this mitzvah given the opportunity.
- The Gemara (Brachot 54b) states that the four people who are obligated to say the Bracha of HaGomel are one who was freed from jail, one who was sick and was healed, one who travel at sea, and one who traveled in the desert. The Gemara learns it from the pasuk in tehillim “They strayed in the wilderness, in the desolation of the road… Hungry as well as thirsty… They rise heavenward, they descend to the depths.” (Tehillim 107:4-5, 26). The acronym for this in hebrew is Chayim. The Rambam (Brachot 10:8), S”A 219:1, and Kitzur S"A 61:1 codify this as halacha.
- S”A 219:9 quotes this opinion. Magen Avraham 219:10 and Mishna Brurah 219:32 write that the Ashkenazic minhag follows this opinion.
- See also Piskei Teshuvot 218, Halichot Shlomo 23:1
- Mishna Brurah 219:3
- Rama 219:8 Mishna Brurah 219:28. This is the opinion that the Tur 219 quotes from the Raavad.
- Taz 219:5, Yalkut Yosef (Brachot pg 583 and 758). This is the opinion that the Tur 219 quotes from Rambam.
- Sh"t Tzitz Eliezer 10:23
- S”A 219:7, Yalkut Yosef 219:17. Ramban Berachot 54b says that one has to say hagomel for traveling the minimum distance, regardless of the extent of the danger involved because the Yerushalmi in Berachot 4:4 says all roads are assumed to be dangerous. Meiri on Berachot 54b quotes an opinion with which he himself disagrees that claims that it is only recited if one encountered serious danger during the traveling. Talmidei Rabbeinu Yona on the Dapei HaRif 43a on Berachot quote the custom of the French rabbis saying that one should only recite it when they travel on a dangerous road even if they don't encounter any trouble and this is quoted in S"A 219:7 as the practice of the germans and french.
- Vezot HaBracha pg 158 quotes Rav Shlomo Zalman (Halichot Shlomo Tefilla 23:5) and Rav Moshe Feinstein (Iggerot Moshe 2:59) as requiring a Bracha, and Minchat Yitzchak (2:47) as arguing. The Minchat Yitzchak's logic is that hagomel is only recited on dangers that are not taken on willingly. Sh"t Igrot Moshe 2:59, Sh"t Yechave Daat 2:26, and Halichot Shlomo (Tefillah 23:5) hold that one should make Birkat Hagomel for traveling in an airplane. Rabbi Mansour on Dailyhalacha.com concludes that for Sephardim one must travel 72 minutes in order to make a Birkat Hagomel and this is the ruling of Rav Ovadia Yosef in Yabia Omer 1:14 and Yechave Daat 2:26 and Rav Shmuel Pinchasi in Kuntres Vichol Hachaim page 34. Chacham Bentzion Abba Shaul in Or Litzion 2:14:43 says that this is only true with commercial flights where the passengers do not know each other, but in an army plane, helicopter or private plane where the passengers do know each other hagomel would not be recited.
- Rabbi Jachter quotes that Rabbi Joseph B. Soloveitchik's practice was only to recite it after airplane travel, if a serious incident occurred but that he said that whoever perceives airplane travel as dangerous should recite hagomel even if nothing happened. Tzitz Eliezer 11:14 rules that for a flight that travels over bodies of water it should be recited but not over a flight between cities within one country.
- Beiur Halacha 219 s.v. Chavush
- Kaf HaChaim 219:11, Piskei Teshuvot 219:6
- S”A 219:6, Mishna Brurah 219:20, Kitzur S"A 61:2. See Piskei Teshuvot 219:4 who writes there’s a minhag who are lenient to wait until Shabbat to say HaGomel at the Torah.
- Magan Avraham 219:6, Mishna Brurah 219:20
- Rambam (Brachot 10:8), S”A 219:3, Beiur Halacha s.v. VeYesh Omerim, Shoneh Halachot 219:2, Piskei Teshuvot 219:15, Kitzur S"A 61:2 based on the pasuk in tehillim 107:32. Mishna Brurah 219:6 allows the one reciting the beracha to be included in the ten.
- Mishna Brurah 219:2
- Sh"t Rivivot Ephraim 1:156:2
- Rambam (Brachot 10:8)
- Mishna Berura 219:3, Sh"t Halachot Ketanot 2:161, Aruch Hashulchan 219:6, Sh"t Beer Moshe 4:22. see also Sh"t Teshuvot Vihanhagot 4:53. see also Iggerot Mosh 5:14 where argues with those who claim that she should say it in front of ten women and instead suggests saying it in front of one person. If she is married, it should be her husband.
- Halichot Shlomo 23:4, Vezot HaBracha (pg 158), see also Kitzur S"A 65:2
- Yalkut Yosef 219:7 (and Brachot p. 572), Sh"t Yechave Daat 4:14-15, Sh"t Yabea Omer 8:23:15, HalachaYomit.co.il write that women do recite Hagomel. Kaf Hachaim 219:3 writes that it should only be recited in front of ten male relatives and adds that if there aren't ten men, it should be recited without shem umalchut. see also Ben Ish Chai Parashat Ekev 65
- Kaf Hachaim 219:7
- S”A 219:4,5
- Hagahot Rabbi Akiva Eiger 219:5 leaves this question in doubt. Therefore, this situation should be avoided (see Piskei Teshuvot 219 note 90).
- Yalkut Yosef (Otzer Dinim LeIsha pg 162-4)