"The best thing that Euskara could contribute to the humanity is to die out" - Miguel de Unamuno
Euskara, Basque language, is a very interesting subject. It survived on two time levels. First, being an ancient language which is still in use, and now, being a minority language which is still in use in 21st century, where we have to deal with stronger and stronger assimilation of weaker cultures around the world.
On the other hand, there were only two times in history (both during Middle Ages) when all the people speaking Basque language on both sides of Pyrenees created common country - Duchy of Vasconia in 7th century and Kingdom of Pamplona in the 11th. Both of them had the opportunity to use Basque language as an official, but what's strange, in both situations, Basque language haven't been used in their official documents.
So if we're speaking about how Basque language survived the times of Roman Empire, when most of the others were forgotten forever, the main reason is quite simple - a longtime alliance between Basques and Romans. While Romans continued extermination of other tribes, like Celtiberians, Basques could easily settle on their lands. This way their culture and language were saved to medieval times.
Of course, as you've mentioned it, we can't forget about geographic location of Basque Country. Situated in mountains, far from trade routes and without good land for agriculture, it didn't have much importance for ages, so the native culture could freely develop. That helped f.e. when almost all the Peninsula was conquered by the Moors, or when there was a strong pressure from Christian, Latin culture against Basque-speaking pagans. In the contrary, right now, the Basque Country is known for being among those regions of Europe which are the most religious, with the difference that now it's helping to preserve old traditions.
From the late Middle Ages it was also a good thing for Euskara that thanks to politic reasons, even when Spain became important kingdom, it still remained multicultural.
Later, it's worth to point out the neutral status during World Wars, which was also partly connected with geographic location of all peninsula. When many other cultures suffered from oppressions, the people of Basque Country weren't affected at all.
Right now, I'd also count a longtime support of Spanish government, regarding cultural differences and minorities. This way people in various regions of Spain (Catalonia, Galicia) speak different languages as their main one.
Of course I can imagine a Spanish historian arguing with the last paragraph, but in comparison with other European countries, the situation of minority cultures in Spain still looks much better.