Slow dynamics in gelation phenomena: From chemical gels to colloidal glasses