We study the viscoelastic properties and the relaxation process in a gelling system by means of a minimal statistical mechanics model. The model is based on percolation and bond-fluctuation dynamics. By opportunely varying some model parameter we are able to describe a crossover from the chemical gelation behaviour to dynamics more typical of colloidal systems. The results suggest a novel connection linking classical gelation, as originally described by Flory, to more recent results on colloidal systems.