The poor stray dog trapped under the iron gate cried in pain until he lost consciousness