Speaking at a ceremony in Makhanda, formerly Grahamstown, in the south of the country, Ramaphosa said that South Africans were "gathered here to celebrate the day we won our freedom."
The first democratic elections were held in South Africa on April 27, 1994, with blacks -- who make up three quarters of the population -- voting for the first time, bringing to an end three centuries of white rule and the apartheid regime in place since 1948.
"We remember the moment we placed a cross on a ballot paper for the first time in our lives," the president said, paying homage to Nelson Mandela, the anti-apartheid campaigner who was elected South Africa's first black president in 1994.
Nevertheless, "we cannot be a nation of free people when so many still live in poverty," Ramaphosa said.
"We cannot be a nation of free people when so many live without enough food, without proper shelter, without access to quality health care, without a means to earn a living," he continued.
"We cannot be a nation of free people when funds meant for the poor are wasted, lost or stolen (...) when there is still corruption within our own country."
Ramaphosa is head of the African National Congress (ANC), the party that has been in power since the end of apartheid.
He took over as president in 2018 from Jacob Zuma, who was forced to resign as a result of a number of corruption scandals.
"As we celebrate 25 years of democracy, we need to focus all our attention and efforts on ensuring that all South Africans can equally experience the economic and social benefits of freedom," Ramaphosa said.
Despite the emergence of a middle class in South Africa, the continent's economic powerhouse, 20 percent of black households still live in dire poverty, compared with only 2.9 percent of white households, according to the Institute of Race Relations.
The unemployment rate in South Africa currently stands at 27 percent, compared with 20 percent in 1994.