Generalization of a retarded Gronwall-like inequality and its applications