For simplicity's sake, let's just say that $a=0,b=1$. Then you want to estimate
\int_0^1 f(x) g(x) dx - \left(\int_0^1 f(x) dx \right) \left(\int_0^1 g(x) dx\right)
from above and below. Furthermore, let me consider two cases:
If $g(x)$ has mean value zero, i.e., $\int_0^1 g(x) dx = 0$, then you know a priori that your approximation isn't a good one. Let's not consider this case any more then.
If $g(x)$ has a mean value different than zero. Let's only consider this case.
Since in this second case it doesn't make a difference in the problem, let us assume for simplicity that $g(x)$ has been scaled in such a way that $\int_0^1 g(x) dx = 1$. Then you are looking for estimates of the term
\int_0^1 f(x) g(x) dx - \int_0^1 f(x) dx
from above and below where $g(x)$ has mean value one.
Now consider a sequence of functions $f_n(x)=(n+1)x^n$. Then, assuming that $g(x)$ is bounded,
\int_0^1 f_n(x) g(x) dx \rightarrow 0, \qquad \int_0^1 f_n(x) dx =1
so your relative error can become arbitrarily large, and by tweaking the sign of $f_n,g$ you can make this an error that can be positive or negative.
Of course, all this shows is that you need to say in which class (or function space) you are looking for your function $f(x)$. Each function $f_n$ above is $C^\infty$, and its limit is in $L_1$, so you can't expect an error bound to hold in $L_1$. But the limit function is not in in $L_p,p>1$ and so it may be that you can find, for example, an estimate in $L_\infty$. In other words, more information is necessary to answer your question.