If such a continuous $g$ exists, then, as you stated, it must preserve convergence of sequences. At this point we don't know the value of $g$ at irrational points $x$, but we do know it must satisfy
$$f(x_n) = g(x_n) \to g(x)$$
for any sequence of rational points $x_n$ that converge to the irrational point $x$.
Thus, an obvious candidate for the definition of $g(x)$ for irrational $x$ is to find a sequence of rationals $x_n$ converging to $x$, and define $g(x)$ to be the limit of $f(x_n)$.
The only thing we have left to check is that the choice of sequence of rationals $x_n$ does not change the definition of $g(x)$. That is, we must show that if $x_n$ and $x'_n$ are two sequences of rationals that both converge to $x$, then
$$\lim_{n \to \infty} f(x_n) =\lim_{n \to \infty} f(x'_n).$$
Why does each limit exist?
The existence of each limit is due to uniform continuity of $f$ implying each sequence is Cauchy.
Why are the limits the same? (Hint: show that the sequences $x_n$ and $x'_n$ get arbitrarily close for large $n$, and then apply uniform continuity.)
If you fix $\delta > 0$, there will exist an $N$ such that $|x_n - x| < \delta/2$ and $|x'_n - x|<\delta/2$ for all $n \ge N$, so the triangle inequality implies $|x_n - x'_n| < \delta$ for all $n \ge N$. Combining this with the definition of uniform continuity, we see that for any $\epsilon > 0$ there exists some $N$ such that $|f(x_n) - f(x'_n)| < \epsilon$ for any $n \ge N$.