The missing argument is a combination of Egorov's theorem and the Dunford-Pettis theorem (for the precise versions of both that we are going to use, see [Brezis, Haim, Functional analysis, Sobolev spaces and partial differential equations, Springer (2011), theorems 4.29 and 4.30 page 115 ]). Roughly speaking, the former tells us that $f_n\to f$ uniformly, up to removing arbitrarily small sets from $X$. And the latter guarantees that $|g_n|$ gives small mass to such small sets, uniformly in $n$ and only depending on the measure of the small set.
Disclaimer: as correctly pointed out by Nik Weaver in his comment, Egorov's theorem crucially requires a finite measure $\mu(X)<+\infty$. Step 1 below gives the key argument in this finite situation. Then Johannes Schürz's comment settles in step 2 the general case, based on the uniform integrability.
Step 1: assume first that $\mu(X)<+\infty$, and pick any $\epsilon>0$.
By Egorov's theorem there exists a subset $X_\epsilon\subset X$ with small complement $\mu(X\setminus X_\epsilon)\leq \epsilon$ such that $f_n\to f$ uniformly in $X_{\epsilon}$, in particular also $f_nh\to fh$. Thus by standard $L^\infty-L^1$ strong-weak convergence the term
$$
\int_{X_\epsilon} f_ng_nhd\mu\to \int _{X_\epsilon}fg hd\mu.
$$
For the remaining term (the integral on $X\setminus X_\epsilon$), the Dunford-Pettis theorem guarantees that $\{g_n\}_n$ is uniformly integrable. Given $\delta>0$, this means that $\int_{X\setminus X_\epsilon} |g_n|\leq \delta$ uniformly in $n$, as soon as $\mu(X\setminus X_\epsilon)\leq \epsilon$ is sufficiently small. Since $|f_n|_\infty\leq M$ and $h\in L^\infty$ this immediately gives
$$
\left|
\int_{X\setminus X_\epsilon} f_ng_nhd\mu
\right|\leq M\|h\|_\infty \delta
$$
Putting everything together and playing a bit with $\epsilon,\delta,n\geq n_0$, and quantifiers gives the desired result (also noticinng that $\int _{X_\epsilon}fg hd\mu\to \int _{X}fg hd\mu$ if $\epsilon\to 0$).
Step 2: assume now that $X$ has infinite measure. Since the sequence $g_n$ is $L^1$-weakly converging, it is uniformly integrable (by the Dunford-Pettis theorem) and therefore for any small $\eta>0$ there exists $X_\eta\subset X$ with $\mu(X_\eta)<+\infty$ and
$$
\int_{X\setminus X_\eta} |g_n|d\mu \leq \eta
\qquad
\forall\, n\geq 0
$$
As a consequence
$$
\left|
\int_{X\setminus X_\eta} f_n g_n hd\mu
\right|
\leq \|f_n\|_{L^\infty(X)} \|h\|_{L^\infty(X)} \|g_n\|_{L^1(X\setminus X_\eta)}\leq M\|h\|_{L^\infty(X)}\eta
$$
can be made arbitrarily small, uniformly in $n$.
The result follows next by applying step 1 on the finite measure set $X_\eta$.
PS: I was not aware of this specific statement, and it may turn out to be quite handy at some point so thank you Maxim Diana!