The campaign was due to start next week and would have seen ads on London buses for “gay conversion” through therapy.
The adverts said: “Not gay! Ex-gay, post-gay and proud. Get over it!”
The banners, backed by Christian groups Core Issues Trust and Anglican Mainstream, were designed to mimick an initiative for same-sex marriage by gay rights charity, Stonewall, which said: “Some people are gay. Get over it!”
Johnson said the campaign was “offensive” and had no place in a tolerant city.
The London Mayor, who is standing for re-election next month, said: “London is one of the most tolerant cities in the world and intolerant of intolerance.
“It is clearly offensive to suggest being gay is an illness someone recovers from and I am not prepared to have that suggestion driven around London on our buses.”
The Advertising Standards Agency said the campaign “does not infrnge any advertising rules in the UK”.
Mike Davidson, the co-director of Core Issues Trust, said: “I didn’t realise censorship was in place. We went through the correct channels and we were encouraged by the bus company to go through their procedures.”
He added: “It is of deep concern that there can only be one point of view and that is the point of view of individuals who are determined to push through gay marriage and apparently believe that homosexuality cannot be altered in any possible way.
“That is not a universally held view. This is a disturbing development and it is disappointing the UK finds itself in this position.”
Ben Summerskill, Stonewall’s chief executive, said the groups were only promoting “voodoo” science.
He added: “Life would be much easier if these organizations just admitted that they don’t like gay people.”