Excitation gaps are of considerable significance in electronic structure theory. Two different gaps are of particular interest. The fundamental gap is defined by charged excitations, as the difference between the first ionization potential and the first electron affinity. The optical gap is defined by a neutral excitation, as the difference between the energies of the lowest dipole-allowed excited state and the ground state. Within many-body perturbation theory, the fundamental gap is the difference between the corresponding lowest quasi-hole and quasi-electron excitation energies, and the optical gap is addressed by including the interaction between a quasi-electron and a quasi-hole. A long-standing challenge has been the attainment of a similar description within density functional theory (DFT), with much debate on whether this is an achievable goal even in principle. Recently, we have constructed and applied a new approach to this problem. Anchored in the rigorous theoretical framework of the generalized Kohn–Sham equation, our method is based on a range-split hybrid functional that uses exact long-range exchange. Its main novel feature is that the range-splitting parameter is not a universal constant but rather is determined from first principles, per system, based on satisfaction of the ionization potential theorem. For finite-sized objects, this DFT approach mimics successfully, to the best of our knowledge for the first time, the quasi-particle picture of many-body theory. Specifically, it allows for the extraction of both the fundamental and the optical gap from one underlying functional, based on the HOMO–LUMO gap of a ground-state DFT calculation and the lowest excitation energy of a linear-response time-dependent DFT calculation, respectively. In particular, it produces the correct optical gap for the difficult case of charge-transfer and charge-transfer-like scenarios, where conventional functionals are known to fail. In this perspective, we overview the formal and practical challenges associated with gap calculations, explain our new approach and how it overcomes previous difficulties, and survey its application to a variety of systems.