Goat milk has been frequently implicated in staphylococcal food poisoning. The potential risk of raw goat milk contaminated by Staphylococcus aureus (S. aureus) in Shaanxi province of China is still not well documented. This study investigated the prevalence, antibiotic resistance, as well as virulence-related genes of S. aureus from raw goat milk samples in Shaanxi, China. A total of 68 S. aureus isolates were cultured from 289 raw goat milk. Most of the isolates were resistant to penicillin and oxacillin, although 41.18%, 33.82%, and 29.41% of the isolates expressed resistance to piperacillin, trimethoprim-sulfamethoxazole, and ciprofloxacin, respectively. Our data demonstrated that 91.18% of the isolates produced biofilm, of which 54.41% isolates belonged to high-biofilm producers. In addition, genotypic analysis of biofilm related genes (fnbA, clfB, fnbB, cna) revealed that 91.18% of the isolates harbored at least one of the genes, in which the most prevalent genes were fnbA (66. 17%), clfB (48.53%), and fnbB (26.47%). 94.8% of the isolates contained at least one toxin-related gene, of which seb (76.47%), tsst (36.76%), and sea (23.53%) genes were the more frequently detected. Further analysis revealed a positive association between fnbA, clfB, fnbB, seb, tsst, and sea genes and certain antibiotic resistance. The results indicated that raw goat milk samples contaminated by S. aureus can be a potential risk to public health.