I was wondering about Gibraltar. It's a great fortress but resupply would have been a nightmare.
Depends..............................
The Axis did not take Malta.
Gibraltar was easier (not easy but easier than Malta) to resupply.
Supplying even a small army/air force in Spain was not going to be real easy from France or Italy.
British Navy/subs may have something to say about ship traffic on the Spanish Mediterranean coast.
There were two (?) rail lines between France and Spain. One on the west coast at the corner of the Bay of Biscay and the other on the Mediterranean coast about 500km away. Around 850-1000km by rail just in Spain.
Maybe you can use the port of Cartagena about 400-420km from Gibraltar?
A lot depends on how 'friendly' the Spanish are and what the Spanish think it will cost them?
Is Spain getting any food, fuel, raw materials from the Allies/neutrals?
Can Germany, Italy (and France?) make up for it?
edit. Spanish rail gauge was 1,668 mm ( 5 ft 521⁄32 in) which is not a big difference, but it does mean you can't just use French/German rail wagons on the Spanish rail lines.
Either transfer the "goods' over to Spanish wagons/carriages or figure out how to adjust on the wheel spacing on the cars while they are loaded (special cars?)
Spanish roads in 1940/41 are not good and much of Spain is hilly/mountainous.
Edit 2. At the start of WW II the British imposed system of inspections/clearances around the world for cargos headed for Spain. After June 1940 this got even stricter and the US agreed to limit oil shipments (being the major exporter of oil to Spain) of about 80% of the oil supply used by Spain in pre civil war days. If Spain did not stay neutral oil supplies could be cut off completely. Things were tightened up in the Spring/summer of 1941 with the German attack on Russia and the Spanish "volunteers. The US cut the oil supply by about 1/3rd. Other things may have been cut a little bit. The US sent inspectors to Spain to monitor Spanish oil consumption (none going to Germany).
Germany was unable/unwilling to send any oil to Spain.
Spain was being squeezed into neutrality and was facing economic ruin if it didn't at least come close to complying.
Spain was selling some raw material to both sides but Spain's survival was more closely tied to the Allies. Fuel for motor vehicles, ships, fishing boats, industry could not be replaced by coal alone or without significant industrial expense.
Perhaps the Axis could have taken Gibraltar, but perhaps the cost would have been an Allied invasion of Spain and not North Africa?
Granted getting past the Pyrenees mountains would have been very difficult but Allied bases in Spain would also have change the dynamic.
Germans had not been as supportive of Franco as the Italians had been, much more cash orientated than credit or gift.