It was formerly the practice (and may still be in some places) to make up a trial jury in whole or in part of men selected from among the bystanders in the court.
Men of law, like doctors, like to express things in Latin when possible, and people drawn on to fill a jury in this manner were called tales de circumstantibus, “such persons as those standing around.”
This was soon shortened to tales, which is the plural of talis, “of such a kind.”
So it follows that a talesman was one of such persons impaneled to complete a jury, from which it has become, simply, any juror.