The evolution of viscoelastic properties near the sol-gel transition is studied by performing oscillatory rheological measurements on two different types of systems: a colloidal dispersion and a thermo-responsive polymer solution under isothermal and non-isothermal conditions. While undergoing sol-gel transition, both the systems pass through a critical point. An approach to the critical point is characterized in terms of divergence of zero shear viscosity and the subsequent appearance of the low frequency modulus. In the vicinity of the critical gel state, both the viscosity and the modulus show a power-law dependence on relative distance from the critical point. Interestingly, the longest relaxation time has been observed to diverge symmetrically on both the sides of the critical point and also shows a power-law dependence on relative distance from the critical point. The critical (power-law) exponents of the zero-shear viscosity and modulus are observed to be related to the exponents of the longest relaxation time by the hyper scaling laws. The dynamic critical exponent has also been calculated from the growth of the dynamic moduli. Remarkably, the critical relaxation exponent and dynamic critical exponent predicted from the scaling laws precisely agree with the experimental values from the isothermal as well as non-isothermal experiments. The associated critical exponents show remarkable internal consistency and universality for different kinds of systems undergoing the sol-gel transition.