President Robert Mugabe and his wife arrived back in Harare early on Sunday.
Mrs Mugabe, 52, is accused of assaulting model Gabriella Engels a week ago at a Johannesburg hotel where her sons were staying.
She has not commented publicly on the case.
A lawyer for Ms Engels told the BBC that they were planning to challenge the immunity decision in court.
Willie Spies said he would argue that the first lady should not have been given special treatment as she had been in South Africa on private business.
The South African government's decision came in a notice from International Relations Minister Maite Nkoana-Mashabane, published in the Government Gazette on Sunday.
"I hereby recognise the immunities and privileges of the First Lady of the Republic of Zimbabwe, Dr Grace Mugabe," she said.
On Saturday, Mrs Mugabe had been due to take part in the first ladies' programme at the Southern African Development Community heads of state summit in Pretoria, which Mr Mugabe, 93, was attending.
However, she failed to show up.
South African police had said they wanted to interview Mrs Mugabe and had set up a "red alert" at the borders to try to ensure she did not leave the country.
But Zimbabwe's ZBC state broadcaster reported that President Mugabe and his wife "arrived on board an Air Zimbabwe flight early on Sunday morning".
It showed pictures of her greeting officials at Harare airport.
Ms Engels' lawyers have said their client was offered money to drop the case but she refused.
She appeared at a press conference on Thursday with a large plaster on her forehead. She has alleged that Mrs Mugabe beat her with an extension cable at the hotel where the model was staying with Mrs Mugabe's two sons.
She told the BBC: "She hit me with the plug and the extension cord. And I just remember being curled down on the floor with blood rushing down my face and down my neck."
The South African Broadcasting Corporation said the Mugabes were scheduled to attend a funeral for a state minister at Harare's Heroes Acre on Sunday.
South Africa has granted diplomatic immunity to Zimbabwean First Lady Grace Mugabe, allowing her to leave the country without answering questions about an assault allegation.