  The $CP$ properties of the coupling between the Higgs boson and the top quark
are investigated with 139 fb$^{-1}$ of proton-proton collision data recorded by
the ATLAS experiment at the LHC at a centre-of-mass energy of $\sqrt{s}=13$
TeV. The $CP$ structure of the top quark-Higgs boson Yukawa coupling is probed
in events with a Higgs boson decaying into a pair of $b$-quarks and produced in
association with either a pair of top quarks, $t\bar{t}H$, or a single top
quark, $tH$. Events containing one or two electrons or muons are used for the
measurement. In an extension of the Standard Model with a $CP$-odd admixture to
the top-Higgs Yukawa coupling, the mixing angle between $CP$-even and $CP$-odd
couplings is measured to be $\alpha=11\,^{\circ+52^{\circ}}_{ -73^{\circ}}$.
