Streptococcus agalactiae infections may lead to clinical or subclinical mastitis in dairy animals when it invades the mammary gland. In this study, 51 S. agalactiae strains were isolated from 305 milk samples that were collected from goats with mastitis in 13 provinces of China. The antimicrobial resistance of S. agalactiae was determined by disk diffusion methods against 18 antibiotics from six classes. In addition, multilocus sequence typing (MLST), and the presence of resistance and virulence genes was determined by PCR analysis. Seven sequence types in five clonal complexes were identified according to MLST; CC103 and CC67 strains were predominant, with rates of 45.1% and 39.2%, respectively. All isolates (100%) were multiresistant to three or more antimicrobial agents. S. agalactiae isolates had a 100% resistance rate to penicillin, oxacillin, and amoxicillin, followed by doxycycline (82.4%), tetracycline (76.5%), and amikacin (74.5%). The lowest resistance was observed for ciprofloxacin (29.4%), which varied in five different regions. The detection rates of six classes of antimicrobial-related genes were calculated as follows: 33 (64.7%) for β-lactam-related resistance gene, 12 (23.5%) for tetracyclines, 11 (21.6%) for quinolone-related resistance genes, 10 (19.6%) for aminoglycosides, 7 (13.7%) for macrolides (ermA, ermB, and mefA), and 3 (5.9%) for lincosamide (lnu(B)). Regarding virulence genes, profile 1 (bca cfb-cspA-cylE-hylB-bibA-pavA-fbsA-fbsB) was the most prevalent, with a detection rate of 54.9%. This work provides a primary source related to the molecular epidemiology of S. agalactiae in dairy goat herds in China and will aid in the clinical treatment, prevention, and control of mastitis.