"Rav Yirmiya ben Elazar said, there are three entrances to Gehenom: one in the desert, one in the sea, and one in Jerusalem" (Eiruvin 19a). The Talmud finds scriptural support for this from the narrative of the earth swallowing up Korach and his supporters in the desert, the description of Yonah crying out to G-d from the depths of the ocean, and from the verse in Isaiah, "Whose fire is in Zion, and His furnace in Jerusalem" (31:9). The exact nature of Gehenom need not concern us; it is the path leading to it that should worry us more.
One can apparently travel to Gehenom in one of three ways. The first--and perhaps easiest--path is by causing communal strife not for the sake of heaven as Korach did. But one can also end up in Gehenom even if one does not actively do wrong, but follows in the footsteps of Yonah who, when faced with a mission to help the people of Nineveh, ran away. One who is unwilling to help others, who stands by while evil is being perpetrated, is one who is on the path to Gehenom.
The gate of Jerusalem refers not to individual sins, but rather, to those of society; when we fail to ensure justice for all, when we take advantage of the weak. This was the message of the prophets, warning that such a society will not endure.
While the above is undoubtedly true, perhaps we can offer an additional explanation about the desert, the sea and Jerusalem.
A desert is a barren wasteland where little can survive. It represents people who accomplish little with their life, leaving nothing of substance when they depart this world. Yet living a wasted life is only one entrance to Gehenom. There is another entrance to Gehenom, this time centered in Jerusalem, the city of the Temple, the place that G-d "chooses to cause His name to dwell there" (Devarim 12:11). While some do little in this life, others do too much. As Newton taught in physics, that for every action there is an opposite and equal reaction; the same holds true for religious fervor. While religion has the potential to greatly elevate both the individual and society, there is nothing more dangerous and harmful than religious energy gone awry. For too many, Jerusalem is not the city of peace that brings people together, but the city that tears people apart, the city where people fight G-d's wars. And as man has a greater propensity for evil than good, we must work hard to ensure that our religious fervor does not open the gates of Gehenom.
While in a desert--and everywhere else, for that matter--water is our lifeline, water can also be a curse. Our prayer for rain concludes with the plea "for a blessing and not for a curse, for life and not for death, for plenty and not for scarcity". But water is much more; it is the method by which our relationship with G-d is measured. Keep the mitzvoth, and be blessed with rain in its time; ignore the mitzvoth, and draught, famine, and exile follow--ideas we repeat every day in the Shema. The land of Israel was chosen specifically because there is little water. Whereas Egypt had the Nile, Jews were to learn that we would have to look heavenward for rain. The first of the ten plagues, turning the water into blood, was meant to teach the Jew that water is not to be taken for granted. If one fails to recognize G-d's hand in nature, then that, too, opens the door to Gehenom.