As per the general theory of relativity, gravity is the consequence of the curvature of space-time by a massive object. Or in other words, a massive object curves the space-time around it and it is this curvature that causes gravity. And due to this curvature of space-time, any object around the massive object would follow a curved path. This includes light too! When Einstein came up with this theory of general relativity in 1915, it was just on paper and there weren’t any solid experiments to support the theory i.e. to prove if light would actually follow a curved path around massive objects.
Therefore, the key to proving general relativity was to find a massive object and a source of light! Luckily, the 20th-century physicists had the sky lit with billions of stars and a massive star closer to the Earth, just like we have today. Astronomers believed that if massive objects could warp space-time, the Sun should do the same and it should bend the path of light (from the stars) around it. However, with the sun radiating as happy as today, it was impossible for anyone to observe those little star lights around the Sun’s edges. As that particular starlight around the surface would show a measurable and significant reading, it was crucial to have an occulted Sun for the experiment.
Luckily, four years later, a few people led by an astronomer named Arthur Eddington got that perfect occultation of the Sun, thanks to the total solar eclipse of 1919. The Moon was perfectly blocking the Sun, just the right way, leaving only the unseen corona and the stars around the edges to be visible as shown below.

Astronomers along the path of the total solar eclipse measured the position of stars simultaneously. When compared with the location data of the same stars observed from the other side of the Earth, the deflection in the position of stars agreed with the theory of general relativity. It proved that the Sun bent the space-time around it.
Since 1919, the total solar eclipses help astronomers to repeat Eddington’s experiment and subsequently prove Einstein’s general relativity. This month’s total solar eclipse at a few parts of the world is one such phenomenal event that stands too close to our hearts.