I think this also a direct consequence of the uniform boundedness principle (see https://en.wikipedia.org/wiki/Uniform_boundedness_principle#Corollaries):
$T_n \colon g \mapsto \int \, f g \mathbb{1}_{\vert f \vert \leq n} \,\mathrm{d}\mu$ is a bounded linear operator $L^1(\mu) \to \mathbb{R}$ and we have the pointwise convergence $T_n(g) \to T(g) = \int \, f g \, \mathrm{d}\mu$ as $n \to \infty$ for all $g \in L^1(\mu)$ by the assumption $\int \, \vert f g \vert \, \mathrm{d}\mu < \infty$ and the dominated convergence theorem. Therefore $T$ is also a bounded operator, i.e. $f \in L^{\infty}(\mu)$.
Thanks to @MaoWao and @DavidGao for this hopefully now correct further remark: The statement "For all $\mathcal{F}$-measurable $f \colon \Omega \to \mathbb{C}$, $\int|fg|\,{\rm{d}}\mu<\infty$ for all $g \in L^1(\mu)$ implies $f \in L^{\infty}(\mu)$" is equivalent to the negation of "There is a sequence of disjoint $\mathcal{F}$-measurable sets $(A_n)_n$ such that for any $n$ it is $\mu(A_n) = +\infty$ and there is no $\mathcal{F}$-measurable subset $B \subseteq A_n$ with $0 < \mu(B) < \infty$" (+) for any measure space $(\Omega, \mathcal{F}, \mu)$.
For one direction, assume that (+) does not hold and that $\int|fg|\,{\rm{d}}\mu<\infty$ for all $g \in L^1(\mu)$. Then there is a (finite) $C > 0$ such that $\Vert f g \Vert_{L^1(\mu)} \leq C \Vert g \Vert_{L^1(\mu)}$ for all $g \in L^1(\mu)$ by the proof above.
Suppose $g \notin L^{\infty}(\mu)$.
Let $A_n := \{\vert f \vert \in [n, n+1)\}$. Then by assumption there is a $N \in \mathbb{N}$ such that for every $n \geq N$ there is a measurable $B_n \subseteq A_n$ with $0 < \mu(B_n) < +\infty$.
Thus $n \mu(B_n) \leq \Vert f \mathbb{1}_{B_n} \Vert_{L^1(\mu)} \leq C \mu(B_n)$ for all $n \geq N$, a contradiction.
For the other direction, assume (+). Let $f = \sum_{n} n \mathbb{1}_{A_n}$ for the sets $A_n$ from (+). Then $\int|fg|\,{\rm{d}}\mu = 0 < \infty$ for all $g \in L^1(\mu)$, but $f \notin L^{\infty}(\mu)$.