Jim Wells is to step down from the Stormont Executive on May 11.
In a statement, the DUP MLA, whose wife is seriously ill, said he had been subjected to nasty and threatening attacks since he claimed children were more likely to be abused or neglected in same sex relationships.
He said: “I am deeply saddened that some of those who represent a different viewpoint from me have attacked my family and me in a deeply personal, nasty and, in some cases, threatening way.
“Some of the outbursts on social media have been particularly abusive and menacing in nature.”
Last week Mr Wells was forced to apologise after he was recorded at an election hustings event saying the “facts show you certainly don’t bring a child up in a homosexual relationship”.
Yesterday, the Police Service of Northern Ireland (PSNI) confirmed they were also investigating an alleged incident during an election canvas in Rathfriland, Co Down.
The daughter of a lesbian woman claimed her mother had been upset after an exchange with Mr Wells on their doorstep in Rathfriland.
Mr Wells, who was appointed health minister 10 months ago, said he had asked to resign so he could care for his wife, who is recovering from two strokes and major heart surgery.
In the statement, which was released by the DUP this morning, he added: “My focus will be on Grace and supporting my family. The events of the last week have taken place against the backdrop of a difficult period.
“On the issue of comments I have made which have attracted significant publicity, I have already said sorry for the offence caused and acknowledged that the comments were factually inaccurate. At no time did I set out to hurt or offend anyone and it has upset me greatly that the comments made have caused distress to some within our community.”
Confirmation of his resignation comes ahead of an Assembly debate on equal marriage at Stormont today.
The cross-community Alliance Party had also tabled an urgent oral question requesting an explanation of the alleged incident in Rathfriland while the SDLP was calling for a vote of no confidence.
The DUP’s stance on LGBT issues, such as its opposition to gay marriage, has been subject to greater scrutiny beyond Northern Ireland during the election campaign, given the party’s potentially important role in the event of a hung parliament.
Last week Liberal Democrat leader Nick Clegg said the furore was an indication of the “truly backward-looking views from the DUP”, but he would not rule out governing alongside the party after the General Election.
DUP leader Peter Robinson said he respected Mr Wells’ decision to stand down.
He said: “I would have wanted it to be otherwise but I respect Jim’s decision. However, he is right to put his family first and I will fully support his decision.”
During his brief tenure as health minister, Mr Wells oversaw the transfer of children’s heart surgery from Belfast to Dublin and introduced plain packaging for cigarettes and minimum alcohol prices.
A devout Christian, he has never hidden his pro-life, anti-abortion views and has clashed with members of the LGBT community over the ban on gay men donating blood.
It is understood Finance Minister Simon Hamilton has been asked to assume some health duties.
Mr Robinson added: “I place on record my thanks, and that of my party, for Jim’s service and trust everyone will accept the stress and strain Jim has encountered over these past months and offer him and his family support and encouragement as Grace battles her illness.”
Gay marriage is a divisive issue in Northern Ireland. Politicians have three times rejected attempts to have it legalised.
Mr Wells is running as a Westminster candidate for South Down.
Other candidates running in South Down are Felicity Buchan (Conservative), Chris Hazzard (Sinn Fein), Harold McKee (UUP), Henry Reilly (Ukip), Margaret Ritchie (SDLP) and Martyn Todd (Alliance Party).
Sinn Fein MLA Maeve McLaughlin, who chairs the health scrutiny committee at Stormont, said some sections of society were “disturbed” by Mr Wells’ comments.
She told the BBC: “Public confidence is critical to any portfolio but I think particularly when we look at a public office that is about the administration of our health service. I think that everyone is society should really feel that they have equality in terms of the provision of health.
“I think Jim Wells has had to listen to the public reaction and I think that some sections of society were really quite disturbed at his comments.
“There is a challenge for the DUP to get the right person in office.”
John O’Doherty, from the Rainbow Project which supports gay, lesbian and transgender people in Northern Ireland, welcomed the minister’s resignation.
He said: “I think it was only a matter of time before Jim Wells stood down after the alleged incident at the weekend and the fact that he was being called before the health committee, plus the vote of no confidence.
“The equal marriage debate today is an opportunity for the DUP to provide clarity on where they stand on LGBT issues.”