The answer is no. First ask this question for functions from $\mathbb{R}$ to $\mathbb{R}$. There are easy counterexamples: take $f(t) = t$ and let $g$ be the characteristic function of the interval $(-\infty,0)$. Then the ranges of $f$ and $f + g$ are both $\mathbb{R}$ but the range of $g$ is not connected.
You can turn that into a counterexample on $C(X)$ by fixing a point $x \in X$ and composing the $f$ and $g$ described above with the evaluation functional $\phi \mapsto \phi(x)$ from $C(X)$ to $\mathbb{R}$ (or, really, any nonzero linear functional on $C(X)$).
I can't think of any good condition that would guarantee this. Just knowing that the range of a function is connected tells you very little about the function.