We perform threshold resummation of soft gluon corrections to the total cross section and the invariant mass distribution for the process $pp to tbar{t}H$. The resummation is carried out at next-to-next-to-leading-logarithmic (NNLL) accuracy using the direct QCD Mellin space technique in the three-particle invariant mass kinematics. After presenting analytical expressions we discuss the impact of resummation on the numerical predictions for the associated Higgs boson production with top quarks at the LHC. We find that NLO+NNLL resummation leads to predictions for which the central values are remarkably stable with respect to scale variation and for which theoretical uncertainties are reduced in comparison to NLO predictions.