In this paper, a new technique for reconstructing and identifying hadronically decaying τ+τ− pairs with a large Lorentz boost, referred to as the di-τ tagger, is developed and used for the first time in the ATLAS experiment at the Large Hadron Collider. A benchmark di-τ tagging selection is employed in the search for resonant Higgs boson pair production, where one Higgs boson decays into a boosted bb¯ pair and the other into a boosted τ+τ− pair, with two hadronically decaying τ-leptons in the final state. Using 139 fb−1 of proton-proton collision data recorded at a centre-of-mass energy of 13 TeV, the efficiency of the di-τ tagger is determined and the background with quark- or gluon-initiated jets misidentified as di-τ objects is estimated. The search for a heavy, narrow, scalar resonance produced via gluon-gluon fusion and decaying into two Higgs bosons is carried out in the mass range 1–3 TeV using the same dataset. No deviations from the Standard Model predictions are observed, and 95% confidence-level exclusion limits are set on this model. [Figure not available: see fulltext.].