Let $H$ be a Hilbert space, consisting of functions $f:\mathbb{R} \to \mathbb{R}$. Let $$ V = \left\{ f_J \in H: f_J= \sum_{j=1}^J c_j^{(J)} g_j, c_j^{(J)}\in\mathbb R, J\in \mathbb N \right\} $$ where $g_j \in H$ for each $j\in \mathbb N$.
My question: If provided that $V$ is dense in $(H,\|\cdot\|_H)$, does any $f\in H$ admit a representation as follows? $$ f = \sum_{j=1}^\infty c_j g_j $$ If not, what type of additional assumptions will be needed?