Kate and William were among those who observed a 72-second silence at the base of the tower in north Kensington in memory of the 72 men, women and children who died in the fatal blaze five years ago.
Many mourners were wearing green scarves and clothing to match the green hearts which adorn the wall below the tower and which have become a symbol of the tragedy.
The duke and duchess chatted with attendees before taking their seats in the front row for the multi-faith service in north Kensington.
Their appearance follows a private meeting earlier on Tuesday between the royal couple and those directly affected by the disaster.
During the anniversary service, 18 green balloons were released as the names of the children who died in the fire were uttered.
There were also choir performances, prayers, readings and the unveiling of a white heart sculpture made out of hands.
The service was live-streamed on screens positioned in the surrounding area so the wider community and public could watch.
Grime artist Stormzy was seen close to the tower while the service took place.
Cambridge Muslim College dean Shaykh Abdul Hakim Murad, one of the speakers, called for those accountable for the fire to be arrested.
He also criticised the Government’s Rwanda immigration scheme and called for a “museum of inequality” to be established in the capital.
He said families “still have not heard the click of handcuffs” and criticised the “xenophobic discourse now sadly gaining ground” amid plans for deportation flights to Rwanda.
He added: “Grenfell shows how the powerless and underestimated can suffer, but also what they can achieve.”
The academic called for a “just closure to this story” before being applauded by hundreds listening.
Father Gerard Skinner, parish priest of St Francis of Assisi church in Notting Hill, said Grenfell Tower has become a “symbol of suffering” for those who died, their loved ones, survivors and the community, and a “symbol of shame” for liars and deceivers.
He continued: “But Grenfell is a symbol of love. It’s why the heart is there at the top (of the tower), that’s why it’s here today.
“A reminder of the love of God, God’s love for each one of us, and your love for each other.
“It is a symbol of change too – of laws and of hearts.”
Eight-year-old Ayeesha, who survived the fire, recited a poem she wrote called Never Forget.
She said: “We will stay strong, we will rise up as a community, we will fight for justice together, we will always remember our friends and our neighbours, we will always remember our home.
“We can’t change the past but we can change the future. Never forget.”
The little girl smiled as she ended the poem and the duke and duchess could be seen smiling as they joined in applause.
Towards the end of the service, floral tributes were laid at the base of the tower by the royal couple and Mayor of London Sadiq Khan.
Kate laid down a wreath with white flowers as William looked on just behind her, before both bowed their heads and stood for a moment of quiet reflection.
The royal couple left in a black car, with Kate waving to onlookers from the back seat as they were driven down Grenfell Road.