Pastor Fred Phelps is gone, called to glory if you believe the teachings of his hate-spewing ministry, the Westboro Baptist Church. To me it seems more likely that his remains are mouldering away somewhere, obeying the laws of physics and biology. But, either way, it seems an appropriate moment to reflect on the man and his legacy.

I had some history with "Gramps", as his family and followers liked to call him. I made two documentaries about his church for the BBC: The Most Hated Family In America in 2006 and America's Most Hated Family in Crisis in 2010. In all, I suppose I spent about a month with the members of the WBC, trying to figure out what induces them to dedicate their every spare moment – when they aren't holding down respectable jobs as lawyers, correctional officers or salespeople in their hometown of Topeka,Kansas – to flying around the country, standing as close to funeral-goers as they are legally allowed and waving hate-filled placards with slogans such as "Thank God for Dead Soldiers", "Fags Eat Poop", and, of course, "God Hates Fags". They became notorious for picketing the funerals of soldiers killed in Iraq and Afghanistan. In the WBC teachings, the soldiers were being punished for fighting for a nation doomed in the eyes of God for its tolerance of homosexuality.

Their main scriptural inspiration is the passage in Leviticus that mandates the death penalty for gay sex ("Thou shalt not lie with mankind as with womankind: it is an abomination") though, for some reason, the adjacent verses, which proscribe astrology in similar terms, never seem to excite the WBC quite so much. Not to mention that Christ had nothing to say on the subject of gay sex or shouting at funerals and plenty to say about kindness and humility.

The WBC has tended to be a family affair, overwhelmingly made up of Gramps' lineal descendants and their spouses. They live in suburban Topeka, in a collection of houses with connected gardens, which they call Zion. Gramps was the prime mover behind the practices of the church. He founded it when the idea of abominating sodomites was mainstream in American Christian circles. In some respects, it was the times that changed, leaving the WBC behind in their dogged adherence to old-style fire-and-brimstone Bible-thumping. But it's also the case that homosexuality seems to have been an obsession with Pastor Phelps.

According to legend, the WBC inaugurated their anti-gay pickets when a Topeka park became a cruising ground in the 1980s. The Phelps decided to make signs and demonstrate against the practice. The WBC doctrine evolved into a belief that the whole of America was fallen and damned in God's eyes, as was anyone who fought under the US flag – or, indeed, who wasn't a member of the Westboro Baptist Church. We are all either "fags" or "fag enablers" – you, me, Desmond Tutu, Princess Di, Donald Rumsfeld, Billy Graham, Liz Taylor – though possibly not Robert Mugabe: Gramps had a soft spot for him. An eternity in hell is the fate of anyone who doesn't get baptised into the WBC and travel the country waving hate-filled placards at political events, colleges and places associated – even in the most tortuously oblique way – with tolerance of homosexuality.

While I was with them, they had a regular local picket of a hardware store that sold Swedish vacuum cleaners. The Swedish government had imprisoned a pastor for homophobic preaching, and for the WBC that made the store a legitimate target for a ritualised Biblical smackdown. For the newcomer, these pickets were bizarre, not simply because of the venom of the signs, but also because they clashed with the banality of the family interaction. For the Phelpses, it was another day at the office – there was a water-cooler ambience of chit-chat. Meanwhile, everyone, even the youngest child, was carrying placards saying: "Thank God for 9/11", "Your Pastor is a Whore" and "Fag Sweden".

There is no question that their caravan of religious bigotry has made life miserable for thousands of people, many of them vulnerable mourners hoping to pay tribute to recently departed loved ones. Among their proposed picketing targets was the funeral of young Amish children who had been shot by a deranged gunman. In the tortured logic of the WBC, those kids died because their parents weren't out holding pickets denouncing homosexuality. In the end, the WBC called off the event only after they were promised airtime on a local radio station, effectively holding the community to ransom.

But the WBC also made life miserable for themselves and inflicted a distorted and poisonous view of the world on the youngest members of their own family, holding over their heads the threat that any deviation or failure of commitment (not going to a picket or socialising with outsiders) would result in a lifetime of banishment. Ex-members – of whom there are quite a few – can have no contact with the church.