A search for dark matter produced in association with a Higgs boson decaying to a pair of bottom quarks is performed in proton-proton collisions at a center-of-mass energy of 13 Te collected with the CMS detector at the LHC. The analyzed data sample corresponds to an integrated luminosity of 35.9 fb-1 . The signal is characterized by a large missing transverse momentum recoiling against a bottom quark-antiquark system that has a large Lorentz boost. The number of events observed in the data is consistent with the standard model background prediction. Results are interpreted in terms of limits both on parameters of the type-2 two-Higgs doublet model extended by an additional light pseudoscalar boson a (2HDM+ a ) and on parameters of a baryonic Z' simplified model. The 2HDM+ a model is tested experimentally for the first time. For the baryonic Z' model, the presented results constitute the most stringent constraints to date.