Reminds me of a case I encountered in '86 (told to me by my holiday rep who was also their rep). A family of US citizens arrived (on the same flight as me) with NATO ID cards but no passports; they were sent back to the UK, as you need a passport to enter Gib.
Really, some agreement should be worked out whereby passengers bound for La Linea exit/check in by a separate gate on the Spanish side of the border; it's not far after all and you could easily build a secure bridge to access it.