Expanding on Jochen's comment, the key insight is that if $\lambda$ is the Lebesgue measure and $h > 0$ is in $L^1(\lambda)$, then the measure $\nu$, defined by
$$ \nu(E) := \int_E h \ d\lambda$$
satisfies the following the properties:
- $\nu$ is a finite measure, i.e. $\nu(\mathbb R) < \infty$.
- $\lambda(E) = 0 \iff \nu(E) = 0$ for all measurable $E$.
Since $\lambda$ and $\nu$ have the same null sets, we have
$$\|f \|_{L^\infty(\lambda)} = \| f \|_{L^\infty(\nu)}.$$
In particular, $f \in L^{\infty}(\lambda) \iff f \in L^{\infty}(\nu)$.
Since $\nu$ is a finite measure, you can use this argument to show that
$$ \lim_{p \to \infty} \| f \|_{L^p(\nu)} = \| f \|_{L^\infty(\nu)}.$$
for all $f \in L^{\infty}(\nu)$.
Now, $$\|f \|_{L^p(\nu)} = \left(\int_{\mathbb R} |f|^p h \ d\lambda\right)^{\frac 1 p},$$
by the definition of $\nu$.
Furthermore, we've already explained that any $f $ in $L^{\infty}(\lambda)$ is also in $L^{\infty}(\nu)$, and $\|f \|_{L^\infty(\nu)} = \| f \|_{L^\infty(\lambda)}$.
Thus
$$ \lim_{p \to \infty} \left(\int_{\mathbb R} |f|^p h \ d\lambda\right)^{\frac 1 p} = \| f \|_{L^\infty(\lambda)}$$
for all $f \in L^\infty(\lambda)$.