There she saw the very thing she had been dreaming of.

Literal

She [topic-は] herself [subject-が] dream [in-に] was-seeing thing [object-を] there [at-で] saw.

The pivot of the sentence is the contrast between the two 見る verbs: 夢に見ていた ('was seeing in a dream' = had been dreaming of) and そこで見た ('saw there' — in waking life). 夢を見る ('have a dream') uses 見る in its canonical idiom for dreaming; 夢に見る is a variant where に marks the dream as the locus of seeing. The relative clause 自分が夢に見ていたもの modifies もの — 'the thing that she had been dreaming of' — and the past progressive ~ていた frames the dreaming as an extended habit before the moment of discovery.