This problem belongs in the calculus subforum.
Suppose g(0) < 0. Then there exists a δ > 0 such that |x| < δ implies g(x) < 0. Consider any x with |x| < δ and g(x) = g(0 + x) to derive a contradiction.
Similarly, if g(0) > 0, then there exists a δ > 0 such that |x| <= δ implies g(x) > 0. Also, g(x + δ) has the same sign as g(x).