。
She was as thin as a rail.
Literal
[topic-は] rail [genitive-の] like was-thin.
のように ('like, in the manner of') turns a noun into a simile — 'as if X.' レールのように痩せる ('be thin like a rail') is a calque of the English idiom 'thin as a rail,' showing how some English-flavored similes have entered Japanese through translation literature. The ~ていた marks the description as a sustained past state. 痩せる normally means 'to become thin' as a change-of-state verb, so 痩せている / 痩せていた describes the resulting state of being thin.