We report laser cooling and trapping of yttrium monoxide (YO) molecules in an optical lattice. We show that gray molasses cooling remains exceptionally efficient for YO molecules inside the lattice with a molecule temperature as low as 6.1(6) $mu$K. This approach has produced a trapped sample of 1200 molecules, with a peak spatial density of $sim1.2times10^{10}$ cm$^{-3}$, and a peak phase-space density of $sim3.1times10^{-6}$. By adiabatically ramping down the lattice depth, we cool the molecules further to 1.0(2) $mu$K, twenty times colder than previously reported for laser-cooled molecules in a trap.