The idea that the atom contains small indivisible quantities of electric charge was developed in the 19th century by various contributors (e.g. Faraday, Stoney, Laming, Weber, and Helmholtz).
When Thomson (Nobel Prize in physics 1906) discovered the electron in 1897 and estimated its mass and charge, he used the free electrons of cathode rays.
The important experiment that showed that atoms contain electrons was the discovery of the Zeeman effect in 1896, i.e. the splitting of spectral lines in the presence of a magnetic field. Lorentz explained the phenomena with his electron theory. In 1902, Lorentz and Zeeman jointly received the Nobel Prize in physics.