I have never been to Gibraltar or Nerja despite having spent over 5 months in Spain, which tells you I give them extremely low priority. I wouldn't try to see either one on a trip of this length that intends to range all the way from Barcelona to Seville and Granada. I would include Cordoba instead. I think you're short on time in Barcelona (just 3 full, non-jetlagged days) given that you want to go to Montserrat.
It sounds like you're planning to drive. Seville-Cordoba-Madrid is much, much faster by train. Even with Toledo throw into the mix--accessible by train only from Madrid although it's physically positioned between Cordoba and Madrid, the train would be faster. A car will be helpful in the south for seeing Ronda between Granada (Nerja) and Seville. Depending on you timing, the car might allow you to stop for short visits to one or more of Arcos de la Frontera, Grazalema and Zahara de la Sierra.
Another place I'd certainly include before Nerja and Gibraltar is Segovia, which can be a day-trip from Madrid.
These are just my opinions, of course. I think Rick's itineraries are too rushed for independent travelers. YMMV.