Stars give tiny planets a gravitational 'squeeze' to strip away their atmospheres