Describing time complexity when internally using a function of unknown complexity
In complete generality there is nothing much you can say. However, in many circumstances it will be the case that $g(n)$ is monotone, and in that case you can say that
$$
\sum_{k=1}^n g(k) \leq ng(n),
$$
a bound which is often quite good.