Among those killed in floods and mudslides that crushed homes in Durban on Tuesday were a six-month-old baby and a young child.
Heavy rains have lashed South Africa in recent days, with the southern and eastern parts of the country badly hit since last weekend.
“Our hearts go out particularly to families and communities who have been directly affected by death, injury and the loss of property,” Ramaphosa said in a statement after returning from crisis talks in Egypt on the situations in Libya and Sudan.
“This situation calls on all of us to pull together as a country to reach out to affected communities.”
The death toll jumped from 33 on Tuesday, as rescuers continued to comb debris for those who might be trapped underneath landslides.
In addition to collapsed buildings and flooded roads, sewer lines were blocked and electricity pylons toppled over.
South African military personnel have been dispatched to help rescue and evacuation efforts.
The South African Weather Services warned that more heavy rain and gale force winds were expected, which could threaten low-lying bridges and roads.
“Unfortunately the numbers have risen to 51. In previous years we have tried to remove people from low-lying areas,” a regional minister, Nomusa Dube-Ncube, told SA FM radio.
“We will continue with negotiations in some of the areas where we believe the long-term solution is people moving out.”