Hitler offered Franco German airborne forces which suggests the Spaniards might not have been up to the task, despite Franco's proud insistence that Spain take it. Even if they did take Gibraltar, I doubt they could've prevented Britain from retaking it or at least using its naval superiority to keep the west end open.
Well, Spain has a historical claim on Gibraltar which many Spanish nationalists would have loved nothing more than to seize from the British Empire, but there were other factors to consider.
There was a plan, codenamed Operation Isabella, for the German occupation of Spain and Portugal, but given the already chaotic scope of the war, this was shelved. What Berlin really wanted was Spanish and Portuguese willing participation on behalf of the Axis. In the event of this, German troops would have moved through Spain and occupied Gibraltar - this would have later been turned over to Spanish control. German troops then would have moved through Portugal and with Portuguese naval assistance, the Kriegsmarine would have secured the Azores and Madeira. After such a strategic benefit but relatively easy victory contingent on Franco and Salazar's agreement, the Spanish and Portuguese navies would have worked alongside the Regia Marina in the Mediterranean, assisting in the siege and conquest of Malta, and making things untenable for British and other Allied forces in North Africa.
This would have had benefits which could have turned the tide of the war (at least the European theatre), but wasn't enacted for several reasons.
Franco recognized the destruction the war could bring to Spain, and as such, his demands to Hitler for Spanish participation were deemed too unreasonable:
Spain demanded shipments of grain and other foodstuffs in mass quantities, as it was still reeling from shortages following the civil war. The Molotov-Ribbentrop pact was about to be torn up, so Germany would no longer have access to raw materials from the Soviet Union, other than what could be transported by army caravan. Germany also already had the obligation of sending military hardware to Italy. On top of this, Spain demanded military hardware.
Spain demanded essentially all of French North Africa. These high-level talks between Hitler and Franco predate Operation Torch, Darland's arrest, and the fall of the Vichy government, and as such, North Africa was still in Vichy hands. Germany couldn't have seized these colonies or allowed Spain to, as such a move would have eroded all agreement between NS Germany and Petain/Vichy. Had Hitler anticipated the weak Vichy resistance to the Allied landings in North Africa and the eventual German occupation of all of France, he might have agreed to this demand.
Also, the United Kingdom employed its usual tactics towards nations which are in a position to hurt it, such as Spain: threats and bribery. Britain threatened to bomb the Spanish Canary Islands if Spain occupied Gibraltar or allowed German troops through its territory, and the Royal Air Force was in a strategic position to be able to do this. If the RAF managed to bomb the Spanish coast, the instability that could have arose could have greatly reinvigorated Republican forces now fighting as rebels in the hills to try and topple Franco's government. On the other hand, records indicate that Churchill authorized the payment of millions in gold to central Spanish banks, and British payment of gold to Spain was guaranteed as long as Spanish neutrality was maintained. These payments were sent even after Franco allowed the brave volunteers of the Azul Division to travel to the Eastern Front as an expeditionary force and fight alongside the Wehrmacht against the Red Army. So given Britain's position and gain to be had in currying favor on both sides, Madrid decided it best not to rock the boat.
That's my take on it anyway. Spain did greatly assist in the escape route for many brave Germans, Italians, and Croats who served in the war, and their relocation to South America, Egypt, and the Middle East. Otto Skorzeny, for example, lived for a time in Madrid.
If the Falange had real power in Spain, perhaps different decisions would have been made, but that's all speculative.
"I am never guided by a possible assessment of my work" - President Vladimir Putin
"Nations whose nationalism is destroyed are subject to ruin." - Muammar Qaddafi