Saturday's gay pride parade in London celebrates 40 years since the formation of the Gay Liberation Front in Britain. This was a watershed moment in British queer history. For the first time, thousands of lesbian, gay, bisexual and transgender (LGBT) people stopped hiding in the closet and suffering in silence. I was one of them. We came out and marched in the streets, proclaiming gay pride and demanding our freedom.

This had never happened before. In 1970, many gay people were ashamed of their homosexuality and kept it secret. Some wished they were straight and went to doctors to get "cured".

This internalised homophobia was not surprising. Forty years ago, the state branded homosexuality as unnatural, indecent and criminal; the church condemned gay people as immoral, wicked and sinful; and the medical profession classified us as sick, abnormal and disordered.

Gay people were sacked from their jobs, evicted from flats, refused service in pubs, arrested for kissing in the street and had their children taken from them by the courts. There was no legal protection against such discrimination. It was lawful. The Gay Liberation Front was the first major challenge to this heterosexism. Inspired by the black power slogan "black is beautiful", it proclaimed "gay is good". Back then, it was very radical to suggest there was anything good about being gay.

Even liberal-minded heterosexuals often supported us out of pity. Many reacted with horror when GLF declared: "Two, four, six, eight! Gay is just as good as straight!" Those assertive, affirmative words – which were so empowering to queers – frightened the life out of smug, arrogant straight people, who had always assumed they were superior.

The rebellion against heterosexual supremacism kick-started a still on-going revolution in public opinion, laws and cultural values. It overturned the conventional wisdom on matters of sex and human rights. Our joyous celebration of gayness contradicted the uptight straight morality that had ruled the world for centuries and oppressed heterosexuals as well as homosexuals.

While most politicians, doctors, priests and journalists saw homosexuality as a social problem, GLF said the real problem was society's homophobia. Instead of seeking to justify our existence, we demanded that the gay-haters justify their bigotry.

This unique style of "protest as performance" was not only effective, but also fun. The Christian morality campaigner Mary Whitehouse had her Festival of Light rally in Central Hall Westminster invaded by a posse of gay nuns. They staged a kiss-in when one of the speakers, Malcolm Muggeridge, disparaged homosexuals, saying: "I just don't like them." The feeling was mutual.

There were also more serious acts of civil disobedience to confront the perpetrators of discrimination. We organised freedom rides and sit-ins at pubs that refused to serve "poofs" and "dykes". I disrupted a lecture by the eminent psychologist, Professor Hans Eysenck, when he advocated the use of electric-shock aversion therapy to "cure" homosexuality.

In the last 40 years, queer people have become more visible than ever before and most of the public are relaxed about same-sex relationships. All homophobic laws have been repealed, apart from the ban on same-sex civil marriage. Positive images of LGBT life abound on television. Politicians and entertainers are openly gay. The police are serious, at last, about tackling homophobic and transphobic hate crimes. Gayness is no longer classified as an illness.

At this pace of progress, homophobic prejudice and discrimination are doomed. It is then that the gay community will face an unexpected challenge. Faced with victimisation, we had to defend our right to be LGBT and create our own community institutions to fill the void created by an uncaring, bigoted society. But when legal equality and social acceptance have been won, will there be any need for a separate identity and community? If one sexuality is not deemed more valid than the other, much of the raison d'etre for distinguishing between gay and straight disappears.

This is the ultimate paradox. The Gay Liberation Front spawned a movement that created the conditions for its own dissolution. The more we secure the acceptance and human rights of LGBT people, the less we need a separate gay identity, community and movement. In a queer-friendly society, the differences between homo and hetero lose their significance. When no one cares who is gay and who is straight, there will be no point in maintaining a distinction between the two sexualities. Labelling people and behaviour becomes irrelevant. The movement becomes redundant.

Forty years after a trailblazing freedom agenda was launched, I am still celebrating LGBT pride. But my eye is firmly fixed on the real prize: a world beyond gay and straight.