(Edit: first version was about lcm rather than gcd). Take $R=k[u,v,w]$, $a=uv$, $b=vw$. Then $gcd_R(a,b)=v$ (times constant). Now let $S=k[a,b]$. Since $a$ and $b$ are independent, $gcd_S(a,b)=1$ (times constant). Right?
Edit: here's an even simpler example: $R=k[u,v]$, $a=u$, $b=uv$, $S=k[a,b]$. Then $a|b$ in $R$, but $a$ and $b$ are both irreducible in $S$.