A search for supersymmetry involving the pair production of gluinos decaying via third-generation squarks to the lightest neutralino (χ˜01) is reported. It uses an LHC proton-proton data set at a center-of-mass energy √s=13 TeV with an integrated luminosity of 3.2 fb−1 collected with the ATLAS detector in 2015. The signal is searched for in events containing several energetic jets, of which at least three must be identified as b jets, large missing transverse momentum, and, potentially, isolated electrons or muons. Large-radius jets with a high mass are also used to identify highly boosted top quarks. No excess is found above the predicted background. For χ˜01 masses below approximately 700 GeV, gluino masses of less than 1.78 TeV and 1.76 TeV are excluded at the 95% C.L. in simplified models of the pair production of gluinos decaying via sbottom and stop, respectively. These results significantly extend the exclusion limits obtained with the √s=8 TeV data set.