Where on earth has she gone?

Literal

She [topic-は] where [toward-へ] go-ended-up [question-の]?

の at the end of a question turns it into an explanatory question — 'tell me the situation regarding where she went.' Without の, どこへ行った? would be a flat factual question; with の, the speaker is asking about the broader story. ~てしまう adds the 'on earth' or 'gone for good' flavor of completion or regret.