Education Secretary Nicky Morgan has hit out at some gay rights campaigners for the "vitriol" she has received on social media.
The Conservative opposed same-sex marriage reforms two year's ago but since being given the additional role of equalities minister has said she "probably would" back the law if the vote was held now.
Ms Morgan said politicians had to "stand and be counted" for their decisions but admitted that she had found the level of abuse she received "difficult" and warned that hectoring people on Twitter risked alienating them.
Addressing the Stonewall education conference, she said "sometimes people take that little bit longer" to back lesbian, gay, bisexual and transgender (LBGT) equality demands that "might seem blindingly obvious" to others.
"They might for instance, not automatically see what the difference between a marriage and a civil partnership really means to someone," she added.
"As many of you know I was one of those people. What changed my mind, was talking to same-sex couples and understanding just how important being married was to them.
"What I do find difficult, however, is the level of vitriol that I sometimes receive, from people with whom I'm very much on the same side in fighting for equality.
"Of course politicians have to stand and be counted because of their votes, and as a politician I'm used to taking my share of abuse.
"But, I think there's a wider lesson that sometimes - particularly on Twitter or other social media - it's easier to shout and hector than it is to recruit new allies.
"Sometimes that is justified, but other times it only serves to make us feel better for a moment. It risks alienating allies of the future - those people who want us to help them change their minds and who will be our champions in the future."
Ms Morgan told the conference she will look at how schools can improve teaching about homophobic, biphobic and transphobic bullying and also plans to do more to tackle discrimination against trans young people.
The Tory attacked the Thatcher government's record on gay rights, criticising the controversial Section 28 law that banned local authorities from "promoting" homosexuality - a legacy Prime Minister David Cameron has previously apologised for.
She said: "I can't imagine what a young woman in school, who thought she might be a lesbian, was feeling in May 1988 when the government of the day passed a pernicious law, making it harder for schools to tackle homophobic bullying.
"A law which said that any family relationship she might have was 'pretend'. A law that reinforced stigma and encouraged prejudice.
"That law was Section 28 and it is a matter of great pride for me that one of David Cameron's early acts as leader of the party was to apologise on behalf of the Conservatives for having introduced it."