The motion tabled by the opposition party Economic Freedom Fighters received the support of 248 parliament members while 91 lawmakers opposed it.
The vote came after Israel's foreign ministry said it had recalled its ambassador to South Africa, Eliav Belotserkovsky, back to Jerusalem “for consultations."
The two countries’ diplomatic relations have witnessed a rise in tensions over the war in Gaza. Ramaphosa previously said his country believes Israel is committing war crimes in Gaza, where thousands of Palestinians have been killed.
South Africa announced last week that it had referred what it called Israel's "genocide" in Gaza to the International Criminal Court for an investigation. Its cabinet has called on the ICC to issue an arrest warrant against Israeli Prime Minister Benjamin Netanyahu.
Earlier this month, South Africa recalled its ambassador to Israel and withdrew all its diplomatic staff.
Ramaphosa's new comments Tuesday came in a virtual meeting of BRICS countries attended by leaders of the bloc including Russian President Vladimir Putin and Chinese President Xi Jinping.
The Israel-Hamas war began after the Palestinian militant group's surprise attacks on Israel on Oct.7 killed about 1,200 people. Israel's retaliatory strikes on Gaza have killed more than 12,700 people, according to Palestinian health authorities.