Background Staphylococcus aureus infections, including Methicillin-Resistant S. aureus (MRSA) and Methicillin-Sensitive S. aureus (MSSA), present significant challenges in healthcare due to rising antimicrobial resistance. This study evaluates the genetic basis of antibiotic resistance in S. aureus, focusing on key resistance-associated genes mecA and PVL. Methods A total of 568 clinical specimens were analyzed for the presence of S. aureus. Demographic data were collected to assess age-dependent prevalence. Antimicrobial susceptibility testing was conducted to evaluate resistance patterns. The prevalence of the mecA and PVL genes was determined using molecular techniques. Results S. aureus was identified in 37.9% of cases, with the highest prevalence (60-79 age group). All S. aureus isolates showed 100% resistance to penicillin. Multidrug-resistant (MDR) strains accounted for 84.19% of isolates, with a significant presence of extensively drug-resistant (XDR) strains. The mecA gene was prevalent in 82.79% of MRSA isolates, indicating its strong association with methicillin resistance. Additionally, 41.86% of all S. aureus isolates were positive for the PVL gene, highlighting its widespread distribution. Conclusions The high prevalence of mecA and PVL genes in S. aureus strains underscores the challenges in managing these infections. These findings emphasize the necessity for judicious antibiotic use and enhanced collaborative efforts to combat antimicrobial resistance. Understanding the genetic basis of resistance can inform more effective diagnostic, therapeutic, and preventive strategies, ultimately improving patient outcomes in S. aureus infections.