Optical metasurfaces have shown to be a powerful approach to planar optical elements, enabling an unprecedented control over light phase and amplitude. At that stage, where wide variety of static functionalities have been accomplished, most efforts are being directed towards achieving reconfigurable optical elements. Here, we present our approach to an electrically controlled varifocal metalens operating in the visible frequency range. It relies on dynamically controlling the refractive index environment of a silicon metalens by means of an electric resistor embedded into a thermo-optical polymer. We demonstrate precise and continuous tuneability of the focal length and achieve focal length variation larger than the Rayleigh length for voltage as small as 12 volts. The system time-response is of the order of 100 ms, with the potential to be reduced with further integration. Finally, the imaging capability of our varifocal metalens is successfully validated in an optical microscopy setting. Compared to conventional bulky reconfigurable lenses, the presented technology is a lightweight and compact solution, offering new opportunities for miniaturized smart imaging devices.