This looks like the kind of thing that one might be able to prove by filtering $U$ by word-length over $g$ and then passing to the associated graded ring. The idea is that this would reduce the problem to the case that $g$ is abelian, since the associated graded ring is a polynomial ring in $\dim g$ variables and the number of generators of $I$ as a left ideal will be at least as big as the number of generators of $\mathrm{gr}(I)$ its associated graded ideal.
I'm not sure whether the invariant dimension will be preserved when you pass to the associated graded though. You might expect it to be as a similar invariant, the grade of the module M, j(M) is preserved when you do this. (Recall that j(M) is the smallest integer j such that $Ext^j_U(M,U)\neq 0$)
Edit: Expansion of strategy:
Proposition 7.1 of Auslander-Gorenstein Rings by Ajitabh, Smith and Zhang tells us that $\mathrm{Ext}^j_U(M,k)\cong \mathrm{Ext}^{d-j}_U(k,M)^*$ where $d=\dim g$ and $(-)^*$ means$\mathrm{Ext}^j_U(M,k)$ is isomorphic to the $k$-vector spacevectorspace dual of $\mathrm{Ext}^{d-j}_U(k,M)$ where $d=\dim g$. Thus invariant dimension is $d-min(j|\mathrm{Ext}^j_U(M,k)\neq 0)$. If one can relate the non-vanishing of $\mathrm{Ext}^j_U(M,U)$ and $\mathrm{Ext}^j(M,k)$ then it might be possible to reduce the problem to something relating the grade of $M$ to the number of relations of $M$. This can be done by passing to the associated graded ring.