We demonstrate that yellow luminescence often observed in both carbon-doped and pristine GaN is the result of electronic transitions via the C(N)-O(N) complex. In contrast to common isolated defects, the C(N)-O(N) complex is energetically favorable, and its calculated optical properties, such as absorption and emission energies, a zero phonon line, and the thermodynamic transition level, all show excellent agreement with measured luminescence data. Thus, by combining hybrid density functional theory and experimental measurements, we propose a solution to a long-standing problem of the GaN yellow luminescence.