Small ruminant mastitis is a serious problem, mainly caused by Staphylococcus spp. Different virulence factors affect mastitis pathogenesis. The aim of this study was to investigate virulence factors genes for biofilm production and antimicrobial resistance to β-lactams and tetracyclines in 137 staphylococcal isolates from goats (86) and sheep (51). The presence of coa, nuc, bap, icaA, icaD, blaZ, mecA, mecC, tetK, and tetM genes was investigated. The nuc gene was detected in all S. aureus isolates and in some coagulase-negative staphylococci (CNS). None of the S. aureus isolates carried the bap gene, while 8 out of 18 CNS harbored this gene. The icaA gene was detected in S. aureus and S. warneri, while icaD only in S. aureus. None of the isolates carrying the bap gene harbored the ica genes. None of the biofilm-associated genes were detected in 14 isolates (six S. aureus and eight CNS). An association was found between Staphylococcus species and resistance to some antibiotics and between antimicrobial resistance and animal species. Nine penicillin-susceptible isolates exhibited the blaZ gene, questioning the reliability of susceptibility testing. Most S. aureus isolates were susceptible to tetracycline, and no cefazolin or gentamycin resistance was detected. These should replace other currently used antimicrobials.