The primary role of CD31 IHC staining in HCC is to evaluate tumor angiogenesis, particularly through the quantification of microvascular density (MVD), which is essential for understanding tumor growth, progression, and metastatic potential. The gene discussed is PECAM1; the disease is hepatocellular carcinoma.