Astronomers had to deal with experimental errors to parametrize their geometric models at least as early as Hipparchus, and possibly earlier. There are some techniques and ad hoc methods that can be seen in hindsight as dealing with them in Ptolemy's Almagest, he discusses interpolation, for example. Ptolemy's "massaging" of Hipparchus's data even became a point of controversy recently, he apparently passed certain interpolations for observed data, with accusations of fraud and plagiarism advanced by Newton and others, see When did plagiarism become a major misconduct in academia? Here is a more charitable Gingerich's description in The Trouble with Ptolemy:
"Ptolemy clearly understood the geometry and realized that by stretching the period of greatest elongation he could get the relative placements of Venus and the earth (for him, the sun) much closer to the ideal positions he needed. Such approximations are characteristic of our most insightful scientists, who see them as a way to tackle otherwise intractable problems... It is clear that he deliberately moved away from the exact time of the greatest elongations in order to get the specific geometry he required... As Ptolemy wrestled with errors of measurement without any error theory, he was repeatedly forced into compromises to reconcile discordant observations."
In Optics V.2 Ptolemy proposes a series of experiments to substantiate his claim that "the angles [of refraction] do bear a certain consistent quantitative relation to one another with respect to the normals", and presents tabulations of relevant data. However, according to Smith's Ptolemy and the Foundations of Ancient Mathematical Optics
"There is, in fact, a specific mathematical law implicit in Ptolemy's tabulations, but its proper formulation in algebraic terms would have been beyond Ptolemy given the limitations of mathematical notation in his day."
Be it as it may, Ptolemy's Optics inspired a tradition, Islamic authors wrote elaborations that included new experimental data, e.g. Ibn al-Haytham's Book of Optics (1021) and al-Farisi's Optics (c. 1320). However, the first person to thematize experimental errors explicitly might be Ibn al-Haytham's contemporary al-Biruni. His interests included minerology, mechanics and even what we would call sociology. He talked of "errors caused by the use of small instruments and errors made by human observers", and of analysis (qualitative) of multiple observations to arrive at a "common-sense single value for the constant sought", to get a "reliable estimate", even suggesting the arithmetic mean. This is similar, and more specific, than Bacon's later four idols of the mind. Rozhanskaya and Levinova write in Statics (see Rashed edited Encyclopedia Of The History Of Arabic Science):
"The phenomena of statics were studied by using the dynamic approach so that two trends – statics and dynamics – turned out to be inter-related within a single science, mechanics... Numerous fine experimental methods were developed for determining the specific weight, which were based, in particular, on the theory of balances and weighing. The classical works of al-Biruni and al-Khazini can by right be considered as the beginning of the application of experimental methods in medieval science."
Needless to say, experimentation and dealing with errors became widespread in 17th century Europe, and even earlier Copernicus, Tycho Brahe and Kepler were conscious of astronomical observation errors. But theory had to wait for some development of probability and statistics. Quantitative theory of observation errors only appears in Simpson's memoir of 1755, which discussed several possible error distributions, including uniform and triangular distribution. For the further story see When did statistics become an integral part of physics?