The demonstration was one of more than 800 events taking place around the world as part of the March For Our Lives movement.
It was started following the shooting at Marjory Stoneman Douglas High School in Parkland, Florida, in February in which 17 people were killed.
Protesters are calling on the US government to pass legislation to effectively address gun violence.
Speakers at the Edinburgh rally included Jack and Ellie Crozier, whose sister Emma was killed in the Dunblane shooting, and Ali Ross, whose sister Joanna also died.
They read a letter of support to those affected by the Parkland tragedy.
The letter, first published on the 22nd anniversary of the Dunblane shooting, stated: “Wherever you march, whenever you protest, however you campaign for a more sensible approach to gun ownership, we will be there with you in spirit.”
Ms Ross also read out a message from Mick North, who lost his daughter Sophie in the 1996 massacre.
He said: “The only factor common to all mass shootings, indeed to all shootings, is that someone has a gun, and in the USA it is just far too easy to get hold of one.
“If the USA really wants to turn its thoughts, tears and prayers after each mass shooting into something positive, it has to deal with the easy availability of firearms.”
Catherine Wilson, who lost her sister Mhairi in Dunblane, also took part in the event, reading her poem For Parkland/The Public I.
She said: “I am so overwhelmed and incredibly impressed by the teenagers in America who are walking out of schools and who are demonstrating today.
“Today is a really important mix of both showing that anger and fighting against something that is incorrect, but also offering that support and that love really, to the students in America.”
She added: “I think we are at a breaking point, I think we’re at the point where the generation that I am part of now and the younger generation who are at school... have seen so many school shootings in their lifetime.
“They have continually grown up in the shadow of school shootings, and they are the point where they just cannot take it any more.”
While the Dunblane shooting led to the UK enforcing some of the strictest firearms legislation in the world, the US gun lobby has resisted change.
“I don’t understand why the freedom to own a gun is seen as more important than seeing your grandchildren grow up, or feeling safe when you go and watch a film in the cinema, or being able to go to the park, or not having your children have to miss education because they’re spending hours on these drills,” Ms Wilson said.
“I don’t understand what is so precious about your guns that is more precious than human life.”
She added: “I am hopeful. I am praying that we make this change because it is a necessity.”