When an alpha or a beta decay takes place, the daughter nucleus is generally formed in one of its excited states eventually comes to its ground state by emitting a photon or photons of electromagnetic radiation.
The process of a nucleus coming down to a lower energy level by emitting a photon is called gamma decay.
Hence γ− rays are originated from excited nucleus.