The problem was that the child had been spoiled too much.

Literal

Problem [topic-は] that child [subj-が] spoiled-too-much-had-been [quotative-という] thing [copula-だ].

A dense verb chain: 甘やかす ('spoil') → passive 甘やかされる → ~すぎる ('too much') → ~ていた (past state). Four layers of verbal morphology packed into one predicate. ということだ frames it all.