。
She was suffering in pain.
Literal
She [topic-は] pain [from/in-に] was-suffering.
苦しむ is intransitive — 'to suffer, to be tormented' — and takes the source of suffering with に. This に marks not the recipient of an action but the cause/locus of an emotional or physical state — the same に that appears in 病気に苦しむ ('suffer from illness'), 貧困に苦しむ ('suffer from poverty'), 罪悪感に苦しむ ('be tormented by guilt'). The auxiliary ~ていた frames it as an ongoing condition in the past — she was suffering throughout some stretch of time, not just at a single moment.