The recent discovery of two-dimensional Mg (2D-Mg) intercalation in GaN has attracted increasing attention, prompting fundamental questions regarding its structural stability and electronic properties. In this work, we employ first-principles calculations to investigate the structural and electronic effects of 2D-Mg intercalation in GaN. We identify the most energetically favorable intercalation ratio of Mg, reveal the critical role of Ga vacancies in restoring semiconducting behavior, and demonstrate that compressive strain further modulates the electronic structure. In particular, the configuration with 75% Mg intercalation and nearest-neighbor Ga vacancy under compressive strain exhibits significant band gap narrowing and enhanced Mg-related acceptor activity. These findings challenge long-standing assumptions about Mg clustering and establish a mechanistic framework based on intercalation, vacancy engineering, and strain control for the design of next-generation p-type GaN devices.