Visa requirements for Gibralter are roughly the same as the UK. EU nationals can visit with a national identity card, everyone else needs a passport.
A UK visa that valid for more than one year can be used to visit. A six month UK visa is not valid for Gibralter.
Visas can be applied for at any United Kingdom embassy.
Gibralter visa information