You can't get married, gay or straight, on a tourist visa. You can only marry if your future spouse has been issued with a fiance visa by the British consulate in there home country.
You can tell I copied that... their
When applying for a marriage ceremony, one of the things they check is the immigration status of the prospective partners.
"The requirements to be met by a person seeking leave to enter the United Kingdom as a general visitor are that he:...
...does not, during his visit, intend to marry or form a civil partnership, or to give notice of marriage or civil partnership"
If he comes in on a tourist visa with the intention of marrying a UK citizen, then that visa becomes invalid. Using deception to enter the UK can lead to the person being deported and banned from entry for a period of time.
Persons intending to come to the UK to marry who do not intend to settle here must apply for a marriage visa on fForm VAF1F. If they intend to settle in the UK, they need to apply for a Fiance visa using a VAF4A form.
Bottom line, do it the right way or risk your relationship becoming much more difficult, for years.