Seventy-two people were killed by the blaze in North Kensington, west London, on 14 June 2017.
The couple joined mourners at the base of the tower for a special service having earlier met several during a private meeting.
A 72-second silence was observed by attendees, concluding with applause.
The attendance of the duke and duchess was "huge" for the community, a local resident said.
Muna Hussain, whose children went to the same school as five of those who died, said: "I was glad to see at least they know how we are feeling as a community and they shared that feeling.
"It makes me very happy. It's massive, it's huge for us. It makes you feel better."
During the service, actor Tim Downie said: "At today's service we honour the 72 innocent men, women and children, mothers, fathers, sons, and daughters, sisters, brothers, cousins, aunts, uncles, nephews, nieces and friends who needlessly lost their lives.
"We must never forget them and carry them with us forever in our hearts."
Many mourners wore green scarves and clothing to match the green hearts that adorn the wall below the tower and which have become a symbol of the tragedy.
Floral tributes and personal notes have been left beside the wall, including a "72" made of white flowers.
Afterwards, several hundred people carried out a two-mile walk around the area.
Dozens of firefighters lined the streets, with many holding green hearts reading "Grenfell", and onlookers applauded as the mourners passed.