Compact varifocal lenses are essential to various imaging and vision technologies. However, existing varifocal elements typically rely on mechanically-actuated systems with limited tuning speeds and scalability. Here, an ultrathin electrically controlled varifocal lens based on a liquid crystal (LC) encapsulated semiconductor metasurface is demonstrated. Enabled by the field-dependent LC anisotropy, applying a voltage bias across the LC cell modifies the local phase response of the silicon meta-atoms, in turn modifying the focal length of the metalens. In a numerical implementation, a voltage-actuated metalens with continuous zoom and up to 20% total focal shift is demonstrated. The concept of LC-based metalens is experimentally verified through the design and fabrication of a bifocal metalens that facilitates high-contrast switching between two discrete focal lengths upon application of a 3.2 V$_{rm pp}$ voltage bias. Owing to their ultrathin thickness and adaptable design, LC-driven semiconductor metasurfaces open new opportunities for compact varifocal lensing in a diversity of modern imaging applications.