Avalanche p-i-n photodiodes were fabricated on AlN templates for back illumination. Structures with different intrinsic layer thicknesses were tested. A critical electric field of 2.73 MV/cm was estimated from the variation of the breakdown voltage with thickness. From the device response under back and front illumination and the consequent selective injection of holes and electrons in the junction, ionization coefficients were obtained for GaN. The hole ionization coefficient was found to be higher than the electron ionization coefficient as predicted by theory. Excess multiplication noise factors were also calculated for back and front illumination, and indicated a higher noise contribution for electron injection.