National Education, Health and Allied Workers' Union (Nehawu) members went on strike last week after wage talks with the government failed.
The health department said on Sunday that clinical operations were hamstrung by a low nursing and administrative support staff turnout.
The court interdict would help stabilise services at the affected hospitals, the department said on Monday.
"This is a victory for innocent and vulnerable patients who suffered the consequences of the strike," spokesperson Foster Mohale said.
Union leaders could not be immediately reached for comment.
But the union said in a statement on Sunday that "no amount of litigation or intimidation by the government will deter us from this noble worthy cause that we have embarked on".
The South African military it had deployed medics to help in the affected hospitals at the request of the health department.
Reuters, the news and media division of Thomson Reuters, is the world's largest multimedia news provider, reaching billions of people worldwide every day.Go to: https://www.reuters.com/