  We report our identification of the optical afterglow and host galaxy of the
short-duration gamma-ray burst GRB 160821B. The spectroscopic redshift of the
host is $z=0.162$, making it one of the lowest redshift sGRBs identified by
Swift. Our intensive follow-up campaign using a range of ground-based
facilities as well as HST, XMM and Swift, shows evidence for a late-time excess
of optical and near-infrared emission in addition to a complex afterglow. The
afterglow light-curve at X-ray frequencies reveals a narrow jet,
$\theta_j\sim1.9^{+0.10}_{-0.03}$ deg, that is refreshed at $>1$ day post-burst
by a slower outflow with significantly more energy than the initial outflow
that produced the main GRB. Observations of the 5 GHz radio afterglow shows a
reverse shock into a mildly magnetised shell. The optical and near-infrared
excess is fainter than AT2017gfo associated with GW170817, and is well
explained by a kilonova with dynamic ejecta mass $M_{\rm
dyn}=(1.0\pm0.6)\times10^{-3}$ M$_{\odot}$ and a secular (postmerger) ejecta
mass with $M_{\rm pm}=(1.0\pm0.6)\times10^{-2}$ M$_\odot$, consistent with a
binary neutron star merger resulting in a short-lived massive neutron star.
This optical and near-infrared dataset provides the best-sampled kilonova
light-curve without a gravitational wave trigger to date.
