The overthrow of a US-backed Shah was a source of encouragement as black South Africans fought against apartheid, Zuma said at a press conference with President Hassan Rouhani, before later meeting Ayatollah Ali Khamenei, Iran's supreme leader.
With international sanctions against Iran now lifted under its nuclear deal with world powers, business activity is likely to increase.
"Iran occupies a special place in our struggle against apartheid," Zuma said, noting how Tehran cut ties with South Africa when it was under white rule, only resuming relations in 1994 after Nelson Mandela was elected as its first black president.
Mandela, who served one term before voluntarily standing down in 1999, visited Tehran before his election and soon after leaving office.
"South Africans were inspired by the 1979 revolution, which showed that emancipation is possible, whatever the odds," said Zuma, the first serving South African president to visit since.
Having signed eight cooperation agreements ranging from energy development to business insurance, Zuma said the nuclear deal was an opportunity to deepen commercial links.
Signup to our newsletter and follow us on Facebook and Twitter!
"The challenge is to dramatically expand trade volumes," he added.
Rouhani, whose government in January implemented last summer's nuclear deal with Britain, China, France, Russia and the United States plus Germany, paid tribute to Mandela, who died aged 95 in 2013.
"Let us cherish the memory of the late Nelson Mandela," after whom a street is named in Tehran, Rouhani said. "He is so very much revered by both the South African and the Iranian people."
Rouhani, who Zuma confirmed has been invited to visit South Africa, said he would like to see direct flights opening up from Tehran.
Zuma's trip comes as he is under fire and accused of corruption at home.
Julius Malema, the firebrand head of South Africa's radical opposition Economic Freedom Fighters, warned that he could seek to remove Zuma's African National Congress (ANC) government "through the barrel of a gun".
Late last month, a constitutional court ruled Zuma had violated the constitution in using public funds to upgrade his private residence and said he must repay the money.
Malema, 35, was expelled from the ANC in 2012 when he was head of the party's youth wing, having said the government was not doing enough to help South Africa's poor.