The modern name "Gibrlatar" is derived from the Arabic meaning “Rock of Tariq” while the ancient name, The Pillars of Hercules referring to The Rock of Gibraltar, has its roots in ancient Greek Mythology.
The Pillars of Hercules
Hercules, in his tenth labor, was charged with the duty to fetch the cattle of Geryon. While engaging his quest, Hercules reached the edge of the Mediterranean, bordering with the Atlantic Ocean. The passage to the Atlantic was blocked by a mountain range which Hercules proceeded to demolish, thus creating the strait of Gibraltar which separates the Iberian Peninsula and Europe from Morocco Africa.
Being so far away from his beloved Greece and in order to be able to find his way back, Hercules erected pillars on both sides of the strait, one in Europe and one in Africa, to mark the vast distance (for ancient times) he had travelled. These pillars which today still stand are respectively called the Rock of Gibraltar or Mount Calpe on the European continent side, and Jebel Musa or Mount Abyla on the African continent side.