Prime Minister David Cameron has “gently” warned the Church of England not to repeat mistakes he said his party had made by alienating gay people in its opposition to marriage equality for gay couples.

Speaking at a reception for the LGBT community at Number 10 Downing Street last night, Mr Cameron said he was “absolutely determined” the Coalition government would legislate for equal marriage rights by 2015.

He issued a warning, however, to religious figures that the Tories had previously positioned themselves on “the wrong side of this argument” and wanted to “gently” make this point to the Church of England.

The Church of England filed a response to the government’s consultation on civil marriage equality earlier this year which said the proposals would “dilute the meaning of marriage for everyone”.

Mr Cameron said last night: “I run an institution – the Conservative Party – which for many, many years got itself on the wrong side of this argument, it locked people out who were naturally Conservative from supporting it and so I think I can make that point to the Church, gently.

“Of course this is very, very complicated and difficult issue for all the different Churches, but I passionately believe that all institutions need to wake up to the case for equality, and the Church shouldn’t be locking out people who are gay, or are bisexual or are transgender from being full members of that Church, because many people with deeply held Christian views, are also gay.

“And just as the Conservative Party, as an institution, made a mistake in locking people out so I think the Churches can be in danger of doing the same thing.”

Among the guests at the reception was Dr Jeffrey John, Dean of St Albans and the most senior openly gay cleric in the Church of England.

In a video for the Out4Marriage campaign this week, Dr John said the Church had spoken “without integrity” in its opposition to marriage equality for gay couples in non-religious ceremonies and said it “doesn’t deserve to be listened to”.

In a plea to gay people who are affected by the opposition, he says: “If you are gay, please don’t judge God by the Church. The official Church doesn’t speak with integrity on this issue and so, frankly, doesn’t deserve to be listened to.

“If you are gay, then please understand that God made you as you are, and loves you as you are, and if you invite Him into your relationship, then of course He will bless you and sustain your love just as much as He blesses and sustains any other marriage.

“I know that’s true from my own experience and that’s why I’m Out4Marriage, because I’m sure God is too.”

Mr Cameron told the audience: “I think marriage is a great institution – I think it helps people to commit, it helps people to say that they’re going to care and love for another person. It helps people to put aside their selfish interests and think of the union that they’re forming.

“It’s something I feel passionately about and I think if its good enough for straight people like me, its good enough for everybody and that’s why we should have gay marriage and we will legislate for it.”