Yes, a marriage performed in Gibraltar is legally valid throughout the United Kingdom. Gibraltar is a British Overseas Territory; its civil marriages are governed by Gibraltar law but recognized under UK law via the Marriage (Same Sex Couples) Act 2013 and prior statutes. Requirements:
The marriage certificate issued is accepted for all UK legal purposes (visas, pensions, name changes, etc.).