The Shulhan Aruch (Orah Haim 228:1) says that when one sees rivers, seas and mountains one should recite “Baruch Ata…Oseh Ma’ase Bereshit” (”Blessed art Thou…Who makes the works of Creation”). If one sees the the Mediterranean Sea after not having seen it for at least thirty days, one recites “Baruch Ata…Oseh Hayam Hagadol” (“Blessed art Thou…Who creates the great sea”). However, there are many opinions that this latter blessing applies to the oceans as well. Since the Mediterranean is at once a regular sea and “the great sea”, there is an opinion to recite the blessing of “Oseh Hayam Hagadol” immediately followed by the words “Oseh Ma’ase Bereshit” and as such, both opinions are fulfilled.
The Rock of Gibraltar is located in such a way that a person standing atop it could see both the Mediterranean Sea and the Atlantic Ocean. According to the Shulhan Aruch, one could rely on the Mediterranean side to recite “Oseh Hayam Hagadol”, and according to the other opinions one could rely on the Atlantic side. Practically speaking though, “Oseh Hayam Hagadol” only applies to the Mediterranean sea.
Regarding rivers, the Shulhan Aruch (ibid:2) only includes those rivers that are mentioned in the story of Creation (Euphrates, Tigris, Pishon and Gihon) which are located in modern-day Iraq. As for mountains, not only are the great ranges like the Alps, Himalayas, Andes, etc. included in the blessing of “Oseh Ma’ase Bereshit”, but Rabbi Ben Zion Abba Shaul (Or LeZion ch. 46, § 62) says that Mount Hermon in Israel is also included. Furthermore, the blessing is also recited on canyons or great trenches and therefore one would be able to recite this blessing on the Grand Canyon or Niagara Falls.
Summary: When one sees the Mediterranean Sea one recites “Oseh Hayam Hagadol”. When one sees oceans, tall mountains or canyons, one recites “Oseh Ma’ase Bereshit”.