I can show the following (which Anton was asking about in comments). Let $X$ be locally compact and Hausdorff, and $U\subseteq X$ open. Let $X_\infty$ be the one-point compactication, so $U$ is still open in $X_\infty$. By the universal property of the Stone-Cech compactification, there is a continuous map $\phi:\beta X\rightarrow X_\infty$ which is the identity on $X$. Then $\phi^{-1}(U)$ is open in $\beta X$, and is just the canonical image of $U$ in $\beta X$. So $U$ open in $X$ shows that $U$ is open in $\beta X$.
(This fails for general closed sets. If $F\subseteq X$ is closed, then $F$ is only closed in $X_\infty$ if $F$ is also compact.)
I'll now use that $\beta X$ is the character space of $C^b(X)$. Let $U\subseteq X$ be open.
Lemma: Assume that $U$ is relatively compact. Under the isomorphism $C(\beta X)=C^b(X)$, we identify the ideal $\{ f\in C(\beta X) : f(x)=0 \ (x\not\in U) \}$ with $\{ F\in C^b(X) : f(x)=0 \ (x\not\in U) \}$
Proof: $X$ is itself open in $\beta X$, and the image of $C_0(X)$ in $C(\beta X)$ is just the functions vanishing off $X$. If $F\in C^b(X)$ vanishes off $U$ then $F\in C_0(X)$ (as $U$ is relatively compact) and so the associated $f$ in $C(\beta X)$ vanishes off $U$. Conversely, if $f\in C(\beta X)$ vanishes off $U$ then the associated $F\in C^b(X)$ is just the restriction of $f$ to $X$, and so vanishes off $U$.
By the Tietze theorem, the restriction map $C(\beta X) \rightarrow C(\beta X \setminus U)$ is a surjection. So we can identify $C(\beta X\setminus U)$ with the quotient $C(\beta X) / \{ f\in C(\beta X) : f(x)=0 \ (x\not\in U) \}$. So by the above, we identify $C(\beta X \setminus U)$ with $C^b(X) / \{ F\in C^b(X) : F(x)=0 \ (x\not\in U) \}$. If $X$ is normal, then we can again use Tietze to extend any $F\in C^b(X\setminus U)$ to all of $X$. It follows that $C^b(X) / \{ F\in C^b(X) : F(x)=0 \ (x\not\in U) \}$ is isomorphic to $C^b(X\setminus U) = C(\beta(X\setminus U))$. So $\beta X \setminus U = \beta (X\setminus U)$ (in a fairly canonical way) under the hypotheses that $X$ is normal and $U$ is relatively compact.
(I'm not sure what happens for non-normal $X$. For $X=\mathbb R$ and $U$ an open interval, we obviously don't need Tietze.)
Lemma: Suppose that $X$ is a compact Hausdorff space. Let $f,g:X\rightarrow[0,\infty)$ be continuous functions. Then the following are equivalent:
$Z(f)\subseteq Z(g)$.
For all $\epsilon>0$, there exists a $\delta>0$ where $f^{-1}[0,\delta]\subseteq g^{-1}[0,\epsilon]$.
There exists a function $u:[0,\infty)\rightarrow[0,\infty)$ that is continuous at the point $0$ with $u(0)=0$ and where $g\leq u\circ f$.
There exists a continuous function $v:[0,\infty)\rightarrow[0,\infty)$ with $v(0)=0$ and where $g\leq v\circ f$.
There exists a continuous bijection $w:[0,\infty)\rightarrow[0,\infty)$ with $w(0)=0$ and where $g\leq w\circ f$ (the mapping $w$ is necessarily a homeomorphism and increasing).
Proof: $5\rightarrow 4,4\rightarrow 3.$ These are trivial.
$4\rightarrow 5.$ Suppose that $v:[0,\infty)\rightarrow[0,\infty)$ is a bijection with $v(0)=0$ and $g\leq v\circ f$. Then let $w:[0,\infty)\rightarrow[0,\infty)$ be the function defined by letting $w(x)=v(x)+x$. Then $g\leq w\circ f$ and $w(0)=0$.
$3\rightarrow 4.$ There is some continuous $v:[0,\infty)\rightarrow[0,\infty)$ where $v(0)=0$ and where either
$\min(\max(g),u(y))\leq v(y)$ for all $y$. Therefore, for all $x$, we have
$g(x)\leq u(f(x))$, so $g(x)\leq\min(\max(g),u(f(x)))\leq v(f(x)).$
$5\rightarrow 2$. Suppose that $\epsilon>0$. Then set $\delta=w^{-1}(\epsilon)$. If $x\in f^{-1}[0,\delta]$, then $f(x)\leq\delta$, so
$g(x)\leq w(f(x))\leq w(\delta)=\epsilon.$ Therefore $x\in g^{-1}[0,\epsilon]$.
$2\rightarrow 1$. If $\epsilon>0$, then there is a $\delta>0$ where
$Z(f)\subseteq f^{-1}[0,\delta]\subseteq g^{-1}[0,\epsilon]$. Therefore,
$Z(f)\subseteq\bigcap_{n=1}^{\infty}g^{-1}[0,1/n]=Z(g)$.
$1\rightarrow 3.$ Suppose that $Z(f)\subseteq Z(g)$. If $Z(f)=\emptyset$, then $\min(f)>0$, so just select a suitable function $u$ with
$u(y)\geq\max(g)$ whenever $y\geq\min(f)$. Now, assume $Z(f)\neq\emptyset$.
Let $u:[0,\infty)\rightarrow[0,\infty)$ be the mapping such that
$u(y)=\max\{g(x)\mid f(x)\leq y\}=\max g[f^{-1}(-\infty,y]].$ Then $u(0)=\max\{g(x)\mid f(x)\leq 0\}=0$. Furthermore, if $x_{0}\in X$, then
$u(f(x_{0}))=\max\{g(x)\mid f(x)\leq f(x_{0})\}$. Therefore,
$g(x_{0})\leq u(f(x_{0}))$. I claim that $u$ is upper semicontinuous (and therefore continuous at $0$).
Suppose that $y\in u^{-1}(-\infty,c)$. Then $\max g[f^{-1}(-\infty,y]]=\max\{g(x)\mid f(x)\leq y\}=u(y)<c$, so
$g[f^{-1}(-\infty,y]]\subseteq(-\infty,c)$. Therefore,
$f^{-1}(-\infty,y]\subseteq g^{-1}(-\infty,c)$. By compactness, there is some $z>y$ where $f^{-1}(-\infty,z]\subseteq g^{-1}(-\infty,c)$. However, if $s<z$, then $f^{-1}(-\infty,s]\subseteq g^{-1}(-\infty,c)$, so
$g[f^{-1}(-\infty,s]]\subseteq(-\infty,c)$. Therefore,
$u(s)=\max(g[f^{-1}(-\infty,s]])<c$ as well. Therefore, since there is a neighborhood $U$ of $y$ where $u(s)<c$ whenever $s\in U$, the function $u$ is upper-semicontinuous.
Q.E.D.
Theorem: Let $X$ be a completely regular space with compactification $C$. Suppose that $f,g:X\rightarrow[0,\infty)$ are continuous functions that extend to continuous maps $\overline{f},\overline{g}:C\rightarrow[0,\infty)$. Then the following are equivalent:
$Z(\overline{f})\subseteq Z(\overline{g})$.
For all $\epsilon>0$, there exists a $\delta>0$ where $f^{-1}[0,\delta]\subseteq g^{-1}[0,\epsilon]$.
There exists a function $u:[0,\infty)\rightarrow[0,\infty]$ that is continuous at the point $0$ with $u(0)=0$ and where $g\leq u\circ f$.
There exists a continuous function $v:[0,\infty)\rightarrow[0,\infty)$ with $v(0)=0$ and where $g\leq v\circ f.$
There exists a continuous bijection $w:[0,\infty)\rightarrow[0,\infty)$ with $w(0)=0$ and where $g\leq w\circ f$.
Now suppose that $X$ is a locally compact regular space with compactification $C$, and suppose that $f,g:X\rightarrow[0,\infty)$ and $f,g$ extend to mappings $\overline{f},\overline{g}:C\rightarrow[0,\infty)$. The following result characterizes when $Z(\overline{f}|_{C\setminus X})\subseteq Z(\overline{g}|_{C\setminus X})$, so one can use the following result to produce more characterizations of when $Z(\overline{f})\subseteq Z(\overline{g})$ when $X$ is locally compact.
Theorem: Suppose that $X$ is a non-compact locally compact regular space with compactification $C$. Let $f,g:X\rightarrow[0,\infty)$ be bounded continuous functions, and let $\overline{f},\overline{g}:C\rightarrow[0,\infty)$ be the continuous extensions of $f,g$ to the domain $C$. Then the following are equivalent.
$Z(\overline{f}|_{C\setminus X})\subseteq Z(\overline{g}|_{C\setminus X})$.
For each $\epsilon>0$, there exists a $\delta>0$ and a compact $K\subseteq X$ such that if $x\in X\setminus K$, then $f(x)<\delta\rightarrow g(x)<\epsilon.$
There exists a continuous bijection $u:[0,\infty)\rightarrow[0,\infty)$ with $u(0)=0$ and a function $A:X\rightarrow[0,\infty)$ where
$A^{-1}[\epsilon,\infty)$ is compact for each $\epsilon>0$
and where $g\leq A+(u\circ f)$.
Proof: $2\rightarrow 1$. Suppose that $c_{0}\in Z(f|_{C\setminus X})$. Therefore, let $(x_{d})_{d\in D}$ be a net that converges to $c_{0}$. Then
for each $\epsilon>0$, there is some $\delta>0$ and compact set $K\subseteq X$ where if $x\in X\setminus K$ and $f(x)\leq\delta$, then $g(x)\leq\epsilon$. Then there is some $d_{0}\in D$ where if $d\leq d_{0}$, then $x_{d}\not\in K$ and where $f(x_{d})\leq\delta$. In this case, we have
$g(x_{d})\leq\epsilon$. Therefore, we conclude that $g(x_{d})_{d\in D}\rightarrow 0$, so since $g$ is continuous, we know that $g(c_{0})=0$, and therefore $c_{0}\in Z(g|_{C\setminus X})$. Thus,
$Z(f|_{C\setminus X})\subseteq Z(g|_{C\setminus X})$.
$1\rightarrow 3$. By the above results, we know that there is a continuous mapping $u:[0,\infty)\rightarrow[0,\infty)$ such that
$\overline{g}|_{C\setminus X}\leq u\circ\overline{f}|_{C\setminus X}$. Therefore, let $A:X\rightarrow[0,\infty)$ be the mapping defined by
$A=\max(0,g-(u\circ f))$. Then
$g=g-(u\circ f)+(u\circ f)\leq A+(u\circ f),$ and $\overline{A}(c)=0$ whenever $c\in C\setminus X$, so $A^{-1}[\epsilon,\infty)$ is a compact subset of $X$ whenever $\epsilon>0$.
$3\rightarrow 2$. Suppose that $g\leq A+(u\circ f)$. Then for all $\epsilon>0$, there is a $\delta>0$ with $u(\delta)<\epsilon$. Therefore, suppose that $c\in C\setminus X$, and $\overline{f}(c)\leq\delta$. Then
$$\overline{g}(c)\leq\overline{A}(c)+(u\circ\overline{f})(c)=u(\overline{f}(c))\leq u(\delta)<\epsilon.$$ In particular, there is no $c\in C\setminus X$ with $\overline{f}(c)\leq\delta$ and $\overline{g}(c)\geq\epsilon$. Therefore, if we set $K=\overline{f}^{-1}[0,\delta]\cap\overline{g}[\epsilon,\infty)$, then $K$ is a closed subset of $C$, so $K$ is compact, but $K$ is also a subset of $X$. Therefore, if $x\in X\setminus K$, then $f(x)\leq\delta\rightarrow g(x)<\epsilon$.
Q.E.D.
Best Answer
A necessary condition is that the subgroup of homoeomorphisms of $\mathbb{R}$ generated by $g_1,g_2$ is not amenable.
As an example concerning $g_1,g_2$ in the OP's comment above, take $$g_1(t) = t+2\hspace{140pt}$$ $$g_2(t)= g(t-2n) + 2n\;\;\; \text{ if }\;\;\; 2n \le t \le 2n+2$$ where $g:[0,2] \to [0,2]$ is any homeo. with $g(0)=0,g(2) =2$. Then $g_1,g_2$ commute. Hence $\langle g_1,g_2\rangle$ is abelian and therefore amenable. Now apply:
Proof: Suppose $L_0: C_b(\mathbb{R}) \to \mathbb{R}$ is a contiunous functional with $L_0(1) = 1$ and $L_0|C_0(\mathbb{R}) = 0$. Since $G$ is amenable, there is a finitely additive $G$-invariant measure $\mu$ with $\mu(G) = 1$. For each $f \in C_b(\mathbb{R})$, the function $G \to \mathbb{R},\; g \mapsto L_0(f \circ g)$ is bounded. Hence we can define $$L: C_b(\mathbb{R}) \to \mathbb{R}; \; f \mapsto \int_G L_0(f \circ g)\; d\mu(g).$$ It's easy to see that $L$ has the desired properties.
In order to obtain $L_0$ let $C_l(\mathbb{R})$ be the space of the continuous functions $f: \mathbb{R} \to \mathbb{R}$ such that $\lim_{t \to +\infty}f(t)$ exists. Then $$L_0: C_l(\mathbb{R}) \to \mathbb{R},\; f \mapsto \lim_{t \to +\infty}f(t)$$ is continous, linear with $L_0|C_0(\mathbb{R}) = 0$ and $L_0(1)=1$. Finally, since $C_l(\mathbb{R})$ is a closed subspace of $C_b(\mathbb{R})$, $L_0$ can be continuously extended to $C_b(\mathbb{R})$ by the Hahn-Banach theorem.