Gibraltar is one of those "well as long as I'm here I should go there" places that seems more interesting the more I look at it. One reason is that it's so close to Tangier, Morocco, sometimes known as the Tijuana of Africa. It's almost like I'm so close that cannot not go.
So, the Gibraltar/Tangier 2-day trip will be the last stop on my epic journey: Madrid to Gibraltar one day, then Tangier and the trip back on the next.
To get to Gibraltar on Nov. 22, I have to take the train from Madrid to Algeciras first (only one morning train, leaving at 8:35am and arriving at 1:46pm), then the bus to Gibraltar/La Linea (a 45-minute ride, leaves every half hour, so I can take the 2:00 bus and get there 2:45). There's a bus tour of the small city and a walking tour, but the best site is the Rock itself, open til 7pm. I can take a 1.5 hr taxi tour or ride the cable car (last ride up at 5:15pm, last ride down at 5:45pm). To see the sights I'd have to hike down which takes 1.5 hrs not including sightseeing stops. But the cable car goes to the very top of the Rock whereas the taxis don't. After dinner I'll take the bus back past Algeciras and into Tarifa, which is the best spot for the ferry to Tangier the next morning (Nov. 23).
The ferry runs every two hours starting at 9:00am and takes less than an hour to cross over to Tangier, Morocco. The vast majority of the visitors chose the comfort of the 65-euro 5-hour tour (plus 67 for the round-trip ferry ride itself), but it can be done independently.
The return poses a problem: the only train back to Madrid leaves out of Algeciras at either 8:45am or 3:05pm on Nov. 23rd. If I want to make the 3:05, I have to account for the ferry from Tangier to Tarifa and the bus from Tarifa to Algeciras so I'd have to leave on the 1:00pm ferry - leaving me only 3 hours in Tangier itself. The 3:05pm train gets me into Madrid at 8:25pm, enough time for a few hours sleep before catching the 5:55am flight from Madrid to Houston (via Frankfurt, Germany) on Nov 24th.
My other option would be to switch the 5:55am flight on the 24th (arriving in Houston 2:05pm) to something more reasonable like 4:20pm or 6:45pm out of Madrid back to Houston, but that would push my arrival date in Houston back to Nov 25th. In this scenario, I'd be able to spend more time in Tangier on the 23rd, then take the ferry back in the afternoon and start heading north towards Madrid. I could go back to Gibraltar for a while and see anything I missed and spend the night in Tarifa or Algeciras and catch the 8:45am train getting in at 2:05pm.
Something to think about.