Suppose the contrary, so that $g(s)<0$ for some $s\in(a,b)$. Replacing now $a$ and $b$ by $\max\{t\in[a,s)\colon g(t)\ge0\}$ and $\min\{t\in(s,b]\colon g(t)\ge0\}$, respectively, we see that without loss of generality (wlog)
\begin{equation}
g(a)=0=g(b).
\end{equation}
Also, by a horizontal shift, wlog
\begin{equation}
a=0,\quad b\in(0,\pi).
\end{equation}

Let
\begin{equation}
h:=-(g''+g)\ge0.
\end{equation}
Then
\begin{equation}
G(t):=G_b(t):=g(t)\sin b=\sin t\,\int_0^b du\,h(u)\sin(b-u)
-\sin b\,\int_0^t du\,h(u)\sin(t-u).
\end{equation}
We have to show that $G\ge0$ on $[0,b]$. Because the nonnegative function $h$ can be however closely approximated in $L^1$ by conical combinations of the indicators of intervals, wlog $h=1_{[c,d]}$ for some $c,d$ such that $0<c<d<b$, in which case
\begin{equation}
G(t)=\sin t\, (\cos (b-d)-\cos (b-c))-\sin b\, (\cos (t-\max (c,\min (d,t)))-\cos (c-t)).
\end{equation}
So, if $0\le t\le c$, then $G(t)=\sin t\, (\cos (b-d)-\cos (b-c))\ge0$.
The case $d\le t\le b$ is similar, by the left-to-right symmetry.

It remains to consider the case when $c\le t\le d$. Then
\begin{equation}
G''(t)=\sin t\, (\cos b\, (\cos c-\cos d)-\sin b\, \sin d)-\sin b \cos c\,\cos t
=A\sin(t+C)=:f(t),
\end{equation}
where $A,C$ depend only on $b,c,d$. The function $f$ will be $\le0$ on the interval $[c,d]$ of length $<\pi$ iff $f(c)\le0$ and $f(d)\le0$. In our case, we have
\begin{equation}
2f(c)=\sin (b-c-d)-\sin (b+c-d)-\sin (b-2 c)-\sin (b)
\end{equation}
and hence $(f(c))'_d=-\sin c\, \sin (b-d)\le0$, so that $f(c)$ decreases in $d$. So, wlog $d=c$, in which case $f(c)=-\sin b\le0$. Thus, $f(c)\le0$ always, that is, for all $d\in[c,b]$.
Similarly, by the left-to-right symmetry, $f(d)\le0$, which completes the proof.