  We report the distances of molecular clouds at high Galactic latitudes
(|b|>10$^\circ$) derived from parallax and G band extinction (A$_{\rm G}$)
measurements in the second Gaia data release, Gaia DR2. Aided by Bayesian
analyses, we determined distances by identifying the breakpoint in the
extinction A$_{\rm G}$ towards molecular clouds and using the extinction
A$_{\rm G}$ of Gaia stars around molecular clouds to confirm the breakpoint. We
use nearby star-forming regions, such as Orion, Taurus, Cepheus, and Perseus,
whose distances are well-known to examine the reliability of our method. By
comparing with previous results, we found that the molecular cloud distances
derived from this method are reliable. The systematic error in the distances is
approximately 5%. In total, 52 molecular clouds have their distances well
determined, most of which are at high Galactic latitudes, and we provide
reliable distances for 13 molecular clouds for the first time.
