We describe the operation of two GaN-based diode lasers for the laser spectroscopy of gallium at 403 nm and 417 nm. Their use in an external cavity configuration enabled the investigation of absorption spectroscopy in a gallium hollow cathode. We have analyzed the Doppler broadened profiles accounting for hyperfine and isotope structure and extracting both the temperature and densities of the neutral atomic sample produced in the glow discharge. We have also built a setup to produce a thermal atomic beam of gallium. Using the GaN-based diode lasers we have studied the laser induced fluorescence and hyperfine resolved spectra of gallium.