Theresa May acknowledged that people may be sceptical about the Tory record on gay rights, but insisted that both she and the party had “come a long way” on the issue.
The Prime Minister said she was proud of the role the Conservatives had played in tackling discrimination in recent years but acknowledged “where we have been wrong on these issues in the past”.
In comments to mark the 50th anniversary of the Sexual Offences Act, which partially decriminalised homosexuality in England and Wales, Mrs May said there was “much more to do” to achieve equality.
Mrs May was joined by former UK prime ministers and Labour leader Jeremy Corbyn in writing comment pieces for PinkNews to mark the anniversary of the 1967 Act.
Mr Corbyn urged the Prime Minister to stand up to US president Donald Trump – who on Wednesday said he wants transgender people banned from serving in the US military – on LGBT issues.
Mrs May said: “I am proud of the role my party has played in recent years in advocating a Britain which seeks to end discrimination on the grounds of sexuality or gender identity, but I acknowledge where we have been wrong on these issues in the past.
“There will justifiably be scepticism about the positions taken and votes cast down through the years by the Conservative Party, and by me, compared to where we are now.
“But like the country we serve, my party and I have come a long way.”
Mr Corbyn said: “In America, the Trump presidency has incited hatred and discrimination against LGBT people. Trump opposes gay marriage and his vice-president, Mike Pence, enacted a religious freedom bill which legalised discrimination against LGBT people.
“Other world leaders have been unequivocal with the US president but not Theresa May, who has failed to challenge this in the strongest terms.
“I am a great believer that through dialogue we can open minds, unite people, and change the world.”
The Prime Minister has also faced criticism over her pact at Westminster with the Democratic Unionist Party, which opposes gay marriage.
Her predecessor David Cameron said one of his “proudest achievements” in office was the Same Sex Marriage Act which legalised gay weddings in England and Wales.
“Marriage is a great institution and I have long believed that it should be there for everybody; it now is and Britain led the way,” he said.
Labour former prime minister Tony Blair said: “We have come a long way over the last 50 years and it’s right to celebrate, but while there are still challenges, such as pupils subject to homophobic and transphobic bullying or LGBT people having to think twice about even holding their partner’s hand walking down the street, there is still further to go.”
Sir John Major warned that “bigotry” still existed in society, as shown by the Brexit arguments over immigration, but “most people today – and especially the young – have moved on from the social prejudices of earlier generations”.
He said: “Bigotry hasn’t gone: witness the shameful hostility that was whipped up during the Brexit campaign – raising irrational fears about the effect of immigration. But, overall, such sentiments are generally in retreat and out of time.”