Sadiq Khan said the online firm had refused to take down the knife videos that were first reported in December.
Mr Khan said the videos, showing recognisable London locations, "were a shocking example of the glamorisation of gang culture".
YouTube said it could not comment on individual cases but said it was in contact with the police on this issue.
The videos, which have been viewed more than 356,000 times, shows gangs threatening rivals with a "Rambo knife" while others make shooting hand signals to a soundtrack of violent rap.
A YouTube spokesperson said the site prohibits videos "that are abusive or that promote violence."
"We work closely with organisations like the Metropolitan police to understand local context and specifically, so that we can understand where artistic expression escalates into real threats."
Gun and knife crime in the capital have increased by 42% and 24% over the last year, according to recent police figures.
Sadiq Khan said: "Social media and the internet can be used to inflame tensions and escalate violence quicker than ever before.
"Internet giants have policies in place around violent content, but they do not go far enough."
Claire Hubberstey, CEO of Safer London, said: "There are some highly dangerous, widely viewed films online that pose a serious threat to young people, both glorifying violence and intimidation and posing a significant risk to those who appear in them."
Youtube said it was committed to continuing and improving its work on this issue and making the site "a hostile space for those who seek to do harm."
Four "violent videos" posted on YouTube have not been removed despite requests from police, the Mayor of London says.