Spartans grind out win over Williamsburg