Mr Gendron, 18, is accused of shooting dead ten people at a supermarket in the US city in New York state on Saturday after posting online the shoppers there came from a culture that sought to “ethnically replace my own people”.
His victims included a pensioner known for her civil rights activism, and a former police officer-turned-security guard. A further three people were injured.
It is the deadliest of the 198 mass shootings which have taken place in the US in the first 19 weeks of the year.
Mr Khan was reportedly described as a "Muslim invader" under a page entitled "Kill high profile enemies" in a 180-page manifesto published online by Mr Gendron.
This comes as Buffalo Police commissioner, Joseph A. Gramaglia, said the suspect had planned a second target after his attack on Tops supermarket. He said Mr Gendron had spoken “about possibly going to another store”.
The majority of his victims were black, with evidence continuing to emerge of his online history, where he focused on racist and anti-Semitic content.
The London mayor said: "It's heart-breaking to see ten innocent people have lost their lives at the hands of this white supremacist, this terrorist. Others have been injured.
"My key response is to make sure that we respond by showing that our diversity is a strength, not a weakness. We're not going to allow this terrorist or others like him to make us cower."
Asked if he felt safe in his role, Mr Khan replied: "It's been on public record that I receive police protection. It's unfortunate, but it's a fact of me being the mayor. I've been incredibly safe because I'm looked after by dedicated, decent, brave police officers."
He added: "In London we've seen terrorists try to inflict damage, terrorise us and change the way we live our lives. We've got to make sure we're always vigilant, never complacent. The best response to a terrorist is to make sure we're resilient and we don't allow ourselves to be cowered."
Mr Khan was in the US last week to promote London's tourism industry, visiting New York and Los Angeles.
The mayor was also named in an online manifesto by Australian terrorist Brenton Tarrant, who shot dead 51 people in two mosques in Christchurch, New Zealand, in March 2019.
Mr Gendron had written online he was inspired by Tarrant, who broadcast his killing spree on Facebook. Saturday’s attack in Buffalo was livestreamed on Twitch, from a video camera fixed to the killer’s helmet, before the platform quickly took it down within two minutes. However, links to recordings of the video had circulated widely on other social media sites and websites, with millions believed to have viewed it.
A year ago, victim Katharine Massey, 72, had written to her local newspaper to call for stricter gun control measures.
“There needs to be extensive federal action/legislation to address all aspects of the issue,” she wrote to the editor of the Buffalo News.