She said she was fine, but in fact she was badly hurt.

Literal

She [topic-は] alright is [quotative-と] said. However, reality [topic-は] terrible injury [object-を] was-in-the-state-of-doing.

ところが is a strong adversative connector — 'however / but in fact / on the contrary' — typically introducing a clause that overturns or contrasts with what was just said. Stronger than しかし or でも, ところが often signals an unexpected reveal. けがをする ('to get injured') here is in resultative ~ていた form: 'was in an injured state.' The combination of 大丈夫 ('I'm fine') with hidden injury is a familiar real-life pattern — the social pressure to downplay one's own condition.