Note that your question is equivalent to the following
Given an open subset $U$ of a topological space $X$, when can we say that there is a continuous real-valued function $f$ on $X$ such that $f(x) > 0$ for all $x \in U$ and $f(x) = 0$ for all $x \notin U$.
Such a set $U$ is called a co-zero set (or, in Engelking, a functionally open set); their complements are zero sets (or, in Engelking, functionally closed). It is easy to show that zero sets are G$_\delta$ (since $f^{-1} [ \{ 0 \} ] = \bigcap_{n} f^{-1} [\;(-1/n , 1/n )\;]$). It follows that co-zero sets are F$_\sigma$. In normal spaces, the co-zero sets are exactly the open F$_\sigma$-sets. (To circle back to other questions that you have asked, this means that in perfectly normal spaces, the co-zero sets are exactly the open sets.)
However in non-normal spaces, there may be closed G$_\delta$-sets which are not zero sets. For example, in the Niemtyzki (or Moore) plane, the set $F = \{ \langle x , 0 \rangle : x \in \mathbb{Q} \}$ is a closed G$_\delta$ set which is not a zero-set.