A lot of fuss has been made by Spain about potentially having to play Gibraltar in a UEFA recognised match, with the RFEF and prominent Spanish politicians strongly stating their disapproval of such a match happening.
It is common knowledge that Spanish teams such as Sevilla, Atletico Madrid, Real Valladolid and Real Madrid (the latter of whom Gibraltar played despite it being during the era of Franco, who had very close ties with Real Madrid) played against the national selection of Gibraltar.
However, El Centro de Investigaciones de Historia y Estadística del Fútbol Español (Centre for Investigation into History and Statistics of Spanish Football), in an article detailing the early years of Spanish sports, includes a letter sent to El Mundo Deportivo in January 1907 that suggests that a Gibraltar selection faced Spain in Madrid, as the first game for a Spanish ‘national’ side.
The website itself denies the chances of this happening, citing that the Spanish official national side didn’t come into existence until 1920, however, it is feasible that an unofficial team may have classified themselves as a ‘national’ side for this encounter.
In 2013, Spain may be sternly refusing any potential recognition of a Gibraltarian national team, however, it may be possible that it was Gibraltar that helped lay the foundations of what is now the number one ranked football side in the world.
The link to the article, which looks at the years 1905-07 in Spanish football, can be found here: http://www.cihefe.es/cuadernosdefutbol/2013/04/primeros-intentos-de-crear-una-seleccion-nacional-de-futbol-1905-1907/