Recent progress in nanofabrication has led to tremendous technological developments for devices that rely on the interaction of light with nanostructured matter. Nanophotonics has hence experienced a large surge of interest in recent years, from basic research to applied technology. For instance, the increased importance of ultralow-energy data processing at fast speeds has been encouraging the use of light for signal transport and processing. Energy demands and interaction time scales become smaller with the physical size of the nanostructures, hence nanophotonics opens important opportunities for integrating a large number of devices that can generate, control, modulate, sense, and process light signals at ultrafast speeds and below femtojoule/bit energy levels. However, losses and diffraction pose fundamental challenges to the fundamental ability of nanophotonic structures to efficiently confine light in smaller and smaller volumes. In this framework, active nanophotonics, which combines the latest advances in nanotechnology with gain materials, has recently become a vital area of optics research, both from the physics, material science, and engineering standpoint. In this article, we review recent efforts in enabling active nanodevices for lasing and optical sources, loss compensation, and to realize new optical functionalities, like PT-symmetry, exceptional points, and nontrivial lasing based on suitably engineered distributions of gain and loss in nanostructures.