Steady-state and transient surface photovoltage ͑SPV͒ in undoped GaN is studied in vacuum and air ambient at room temperature and 400 K with a Kelvin probe. The results are explained within a phenomenological model accounting for the accumulation of photogenerated holes at the surface, capture of free electrons from the bulk over the near-surface potential barrier, and emission of electrons from surface states into the bulk. Simple analytical expressions are obtained and compared with experimental results. In particular, the proposed model explains the logarithmic decay of the SPV after stopping illumination. Internal and external mechanisms of the SPV are discussed in detail. It is shown that an internal mechanism dominates at low illumination intensity and/or small photon energies, while external mechanisms such as charging of a surface oxide layer and photoinduced processes play a significant role for above-bandgap illumination with sufficient intensity.