A big part of science in general is a practice of relying on inferences.
I will use the development of statistical mechanics as exemplary for the practice of relying on infererences.
Statistical mechanics came up around the time of Maxwell, and Maxwell made significant contributions. Statistical mechanics reproduced theoretical results that had been obtained before in thermodynamics. Thermodynamics is agnostic as to what matter consists of. As we know, an underlying assumption of statistical mechanics is that matter consists of indivisible units: atoms.
Initially statististical mechanics did not have the means to infer the size of atoms. Even so, on the basis of the success of statistical mechanics as a theory of physics the existence of atoms was accepted as demonstrated beyond reasonable doubt. (Among the few dissenters was Ernst Mach, who argued that the burden of proof had not been met, and that in general inferences should never be counted as scientific facts.)
How high does one want to set the bar for meeting the burden of proof?
Should the work with scanning tunneling microscopes be counted as the first proof that atoms exist?
Or should the earlier work of diffraction experiments be counted as so? See the wikipedia article about Bragg's law.
Diffraction of X-rays by crystals: if crystals consist of atoms they will act as a diffraction grating when X-rays of sufficient small wavelength interact with the crystal.
So when the photograpic plate shows a pattern of dots, consistent with diffraction of the X-rays, is that the point where the existence of atoms should be regarded as scientific fact?
One of the major scientific results in 1905 was the publication of two articles that for the first time gave the means to determine Avogadro's number. When the value of Avogadro's number is known then the size of atoms follows from that.
These ways of determining Avogadro's number were developed by Einstein. In his article about Brownian motion Einstein developed the means to obtain Avogadro's number from observable statistical properties of Brownian motion.
The other way of determining Avogadro's number was in Einstein thesis, about properties of solutions of sugar in water. The dissolved sugar changes the viscosity of the water, and in his thesis Einstein developed the means to obtain Avogadro's number from the amount of change of viscosity.
As pointed out in the other answer, the statistical properties of brownian motion needed to infer Avogadro's number were measued in experiments conducted by Jean Baptiste Perrin.
The other way of obtaining Avogadro's number was executed too, and the two results were in agreement.
My understanding is that it was that that point that the last dissenters conceded that the existence of atoms had to be regarded as scientific fact.
Einstein's treatment of the photo-electric effect was in terms of statistical mechanics.
I recommend the following webpage by John Norton:
Atoms Entropy Quanta Einstein's Statistical Physics of 1905
John Norton, physicist and historian of physics, describes that the three 1905 publications by Einstein that involve statistical mechanics are very much interconnected.
Quote:
Take a system that consists of very many, spatially localized, independent microscopic components. That constitution can be read from the thermal properties of the system, as long as one knows how to read the signs.
In his treatment of the photo-electric effect Einstein developed the statistical mechanics understanding of it far beyond the work of Max Planck.
(Even if Einstein would never have developed relativistic physics: his statistical mechanics treatment of the photo-electric effect was in itself big enough to earn him the Nobel prize for physics.)
So:
While in 1905 the technology did not exist to perform single-photon photo-electric experiments, the statistical mechanics evidence was strong, strong enough to convince the physics community of the time.