The suggestion that Supergirl sits behind a secret door built with enough gold bricks is a guess rather than a confirmed method.
LEGO Batman 2 does gate characters behind collectible milestones, so the general shape of the idea is right — gold bricks and completion goals are exactly how the roster opens up.
For a definitive answer, check a current character unlock guide for the platform you're on. These lists get corrected over time, and a guess repeated often enough starts to look like fact.