First-principle calculations of the electronic structure and magnetic interaction of GaN:Gd have been performed within the generalized gradient approximation (GGA) of the density functional theory with the on-site Coulomb energy U taken into account (also referred to as GGA+U). The ferromagnetic p-d coupling is found to be over 2 orders of magnitude larger than the s-d exchange coupling. The experimental colossal magnetic moments and room-temperature ferromagnetism in GaN:Gd reported recently are explained by the interaction of Gd 4f spins via p-d coupling involving holes introduced by intrinsic defects such as Ga vacancies.