Since $e(x)=\gcd(g(x),h(x))$ it means we can write $e(x) = a(x)g(x)+b(x)h(x)$. But $e(x)|f(x)$ it means $f(x) = e(x)d(x)$. Therefore, $f(x) = e(x)d(x) = a(x)d(x)g(x)+b(x)d(x)h(x)$. It follows that $g(x)j(x) \equiv g(x) ~ \bmod h(x)$ where $j(x)=a(x)d(x)$.