Gibraltar has changed hands with nearly every major invasion since the ancients Greeks claimed it as the end of the known world.
In more recent times it has been ruled by Muslims, Dutch, Spanish and now England, since 1713.
Only 27,000 citizens call it home. Instead of going to war to get it back,
Spain has prudently given ‘the rock’ an autonomous region status and life goes on peacefully–
although you have to wave your passport at customs and change money from euros to UK pounds.
There is no gay ‘community’ to speak of but there are some discreet watering holes favored by the few queer folks there.

For information about LGBT life in Gibraltar see News & Reports on this site.
Also read the story about gay Spain.