Model for reversible colloidal gelation