We report on the study of the magnetic ratchet effect in AlGaN/GaN heterostructures superimposed with lateral superlattice formed by dual-grating gate structure. We demonstrate that irradiation of the superlattice with terahertz beam results in the dc ratchet current, which shows giant magneto-oscillations in the regime of Shubnikov de Haas oscillations. The oscillations have the same period and are in phase with the resistivity oscillations. Remarkably, their amplitude is greatly enhanced as compared to the ratchet current at zero magnetic field, and the envelope of these oscillations exhibits large beatings as a function of the magnetic field. We demonstrate that the beatings are caused by the spin-orbit splitting of the conduction band. We develop a theory which gives a good qualitative explanation of all experimental observations and allows us to extract the spin-orbit splitting constant alpha_{rm SO}= 7.5 pm 1.5 meV unicode{x212B}. We also discuss how our results are modified by plasmonic effects and show that these effects become more pronounced with decreasing the period of the gating gate structures down to sub-microns.