Defender Andy Smith struck a late winner for Gillingham and boss Gareth Ainsworth hailed the defender as “sensational”.