She wished to recover from her illness.

Literal

She [topic-は] illness [subject-が] heal thing [object-を] wished.

治ることを願った — こと nominalizes the recovery, which becomes the object of 願う ('to wish'). 治る is intransitive — the illness heals by itself.