"Our departed father was a crusader in the struggle for freedom, for justice, for equality and for peace, not just in South Africa, the country of his birth, but around the world," Ramaphosa said, delivering the main eulogy at the service in St George's Cathedral, Cape Town, where for years Tutu preached against racial injustice.
The president then handed over the national flag to Tutu's widow, Nomalizo Leah, known as "Mama Leah". Tutu, who was awarded the Nobel Peace prize in 1984 for his non-violent opposition to white minority rule, died last Sunday aged 90.
His widow sat in a wheelchair in the front row of the congregation, draped in a purple scarf, the colour of her husband's clerical robes. Ramaphosa wore a matching necktie.
Cape Town, the city where Tutu lived for most of his later life, was unseasonably rainy early on Saturday as mourners gathered to bid farewell to the man fondly known as "The Arch".
The sun shone brightly after the requiem Mass as six white-robed clergy acting as pall bearers wheeled the coffin out of the cathedral to a hearse.
Tutu's body will be cremated and then his ashes interred behind the cathedral's pulpit in a private ceremony.
"Small in physical stature, he was a giant among us morally and spiritually," said retired Bishop Michael Nuttall, who served as Tutu's deputy for many years.
Life-size posters of Tutu, with his hands clasped, were placed outside the cathedral, where the number of congregants was restricted in line with Covid-19 measures.
Archbishop of Canterbury Justin Welby, who leads the global Anglican Communion, said in a recorded message: "People have said 'when we were in the dark, he brought light' and that... has lit up countries globally that are struggling with fear, conflicts, persecution, oppression."
Tutu's family members were visibly emotional.
His daughter, Reverend Nontombi Naomi Tutu, thanked well-wishers for their support as the Mass began, her voice briefly quivering with emotion.
'Rainbow Nation' Tutu's focus
Widely revered across South Africa's racial and cultural divides for his moral integrity, Tutu never stopped fighting for his vision of a "Rainbow Nation" in which all races in post-apartheid South Africa could live in harmony.
Hundreds of well-wishers queued on Thursday and Friday to pay their last respects as his body lay in state at the cathedral.
As Anglican archbishop of Cape Town, Tutu turned St George's into what is known as a "People's Cathedral", a refuge for anti-apartheid activists during the turbulent 1980s and 1990s when security forces brutally repressed the mass democratic movement.
A small crowd of around 100 people followed the funeral proceedings on a big screen at the Grand Parade, opposite City Hall where Tutu joined Nelson Mandela when he gave his first speech after being freed from prison.
"We have come to give our last respects to our father Tutu. We love our father, who taught us about love, unity and respect for one another," said Mama Phila, a 54-year-old Rastafarian draped in the green, red and yellow colours of her faith.
Mandela, who became the country's first post-apartheid president and who died in December 2013, once said of his friend: "Sometimes strident, often tender, never afraid and seldom without humour, Desmond Tutu's voice will always be the voice of the voiceless."