I suppose this is the analysts' version of Hilbert's nullstellensatz. Here's a proof that I think I learned from one of the standard analysis books, though I don't remember which one:
Let $f$ be a function which vanishes on the vanishing locus of $I$. Fix $\epsilon > 0$ and let $U$ denote the set of all points $x$ where $|f(x)| < \epsilon$. $U$ is open, so its complement $K$ is closed and hence compact. Note that $U$ contains the vanishing locus of $f$ which contains the vanishing locus of $I$, so for every $y$ in $K$ there is a function $g_y$ in $I$ such that $g_y$ is nonvanishing on a neighborhood $V_y$ of $y$. The open sets $V_y$ cover $K$, so there is a finite subcover $V_{y_1}, \ldots, V_{y_n}$. Define a new function $g$ in $I$ by $g(x) = g_{y_1}(x)^2 + \ldots + g_{y_n}(x)^2$.
Notice that for each integer $n$ the function $1 + ng$ is nowhere vanishing and hence $1/(1 + ng)$ is a continuous function on $X$. Thus $f_n := f \frac{ng}{1 + ng}$ is a sequence of functions in $I$; I claim that $f_n$ is within $2\epsilon$ of $f$ for $n$ sufficiently large. Indeed, for $x \in U$ we have $|f(x) - f_n(x)| < 2 \epsilon$ for all $n$ since $|f(x)| < \epsilon$ and $0 \leq \frac{ng}{1 + ng} \leq 1$. For $x \in K$ we have that $|f(x) - f_n(x)| < 2 \epsilon$ for $n$ sufficiently large (independent of $x$) since $\frac{ng}{1 + ng}$ converges uniformly to $1$ on $K$. This completes the proof.