Some images and comments about the place:
Subterranean Exploration: Gibraltar WW2 Tunnels
In detail the defences grew steadily, and included the following:
This, may take a while to type up, but the below is a list of the Batteries (Excluding Bofars) on Gibraltar.
PRINCESS CARLONINE'S BATTERY - One 6 inch Mk VIII
TOVEY BATTERY - Two 6 inch Mk VIII
WHITE ROCK AA - Two 3.7 Inch
SIGNAL HILL AA - Two 3 inch 30 CWT
GLACIS AA - Two 3,7 inch
MONTAGUE BASTON AA - Two 3.7 inch
DETATCHED MOLE AA - Two 30 inch 20 CWT
RECLAMATION AA - Four 3,7 Inch
DEVILS GAP BATTERY - Two 6 inch Mk VIII
OIL TANKS - One 6 inch Mk VIII
BREAKNECK BATTERY - One 9.2 inch Mk X on Mk V mounting
LORD AIREY'S BATTERY - One 9.2 inch on Mk VII Mounting
OIL TANKS AA - Two 3.7 inch
MARTINS BATTERY - Two 4 inch QF
O'HARA's BATTERY - One 9.2 Mk X on Mk VII mounting
SPUR BATTERY - One 9.2 Mk X on Mk VII mounting
LEVANT BATTERY - One 9.2 Mk X on Mk V mounting
EUROPA ADVANCE BATTERY - Two 4 inch QF
WINDMILL HILL AA - Four 3.7 inch
BUFFADERO BATTERY - One 9.2 Mk X on Mk V mounting
'P' EMPLACEMENT - Two 9.2 inch Howitzers
SOUTH BATTERY AA - Four 3.7 inch
LIGHTHOUSE AA - Four 3.7 inch
WEST BATTERY - One 9.2 Mk X on Mk V mounting
GENISTA BATTEY - Two 6 inch Mk VIII
NAPIER BATTERY AA - Four 3.7 inch
SOUTH MOLE BATTERY - One 4 inch QF
In addition the following emplacements were placed on the Harbour walls
T.1. - one 6pdr twin mounting (2pdrs I think in 1941)
T.2. - one 6pdr twin mounting
T.3. - one 6pdr twin mounting
T.4. - one 6pdr twin mounting
T.5. - one 6pdr twin mounting
T.6. - one 6pdr twin mounting
Also, a total of 34 Bofors sites existed.
British Defenses
Had Operation Felix taken place during January 1941 as planned, what opposition would the attackers have faced?
In September 1939 the garrison comprised two British battalions: 2nd The Kings Regiment and 2nd Somerset Light Infantry. 4th Devonshire arrived in May 1940 and 4th Black Watch in July 1940, so by January 1941 four infantry battalions were in place.
However the British were in the process of transferring or forming additional Infantry. These were the 1st and 2nd Gibraltar Brigades each with with reinforced and additional battalions.
3rd Heavy Regiment, Royal Artillery (previously "Gibraltar Coast Defenses" and later redesignated 3rd Coast Regiment) controlled 4th, 26th, and 27th Batteries with 8 x 9.2-inch guns, 7 x 6-inch guns, and 6 x twin 6-pounders. (Artillery strength also grew considerably later in the war.)
In September 1939 two AA batteries, the 9th and 19th, defended Gibraltar from air attack with 4 x 3-inch, 4 x 3.7-inch, and 2 x 40mm guns. HQ 10th AA Regiment was later formed to control the two batteries. The 82nd Heavy AA Regiment arrived in July 1940 with three batteries (156th, 193rd, and 256th) including 16 3.7-inch guns, 8 x 40mm Bofors guns, and the first radar sets. 3rd Searchlight Battery also arrived in July. Some shuffling of assets and re-numbering of units followed (including departure of HQ 10th AA Regiment, but no batteries); however, this AA strength was further reinforced in March 1941 by approximately a further 6 batteries . If the airfield was not protected by an advance into Spain before the arival of the Germans, there would be no direct air support, since the airfield was forward of the defensive positions. However airfields were close by in Spanish Morocco. The British planned to capture these in the event of any aggressive moves by the Germans
The approach peninsula to the fortress was less than two miles wide, and had been deliberately cleared of all cover and obstacles. The german assault forces amounted to one Corps, and would advance across many thousands of yards of cleared terrain. It was heavily mined as I recall