She had lived there for many years.

Literal

She [topic-は] there [in-に] how-many-years even was-living.

何~も is a productive pattern that turns the question word 何 ('how many?') into emphatic 'many / a great number' — 何回も ('many times'), 何度も ('over and over'), 何人も ('many people'), and here 何年間も ('for many years'). The も 'even / also' rhetorically extends an unspecified count to mean a large quantity. ~ていた (the past progressive/state) describes an ongoing situation that held throughout the past period — she was in the state of living there for that whole stretch.