How did astronomers first come to understand that the Sun's core was a gas? I was reading a very old book (around 1850) on astronomy and the author explains Sun spots as a phenomena where you can see the black planetary like hard core of the Sun through two different atmospheres.  It got me interested that somewhere between 1850 and now it became understood that the Sun's core is a gas.  How was this determined conclusively and approximately when in history?
Well simply said: All data fits the premise that it should be a gas.

But what data?


First of all, in the late 1960's the 5-minute solar oscillations on the surface of the sun have beend discovered. Those have been recognized as surface features of internal pressure waves with penetration depth $d$, wavenumber $k$ and their relation roughly $d \sim  \frac{1}{\sqrt{k}}$.
So from the measurment and simple existence of certain wave-ripples on top of the photospheric plasma-ocean we can learn about the interior of the sun. To relate the strength of certain wavemodes to the interior structure of this plasma-ball we use usually a reverse-engineering approach called modelling. We take what we know about gases, energy transport etc. and calculate from this how a solar-oscillations-spectrum on a modelled sun would look like. Then compare, scratch your head, change the modell and repeat until it fits. More mathematical details, if you are interested can be found in the excellent lecture notes on Helioseismology from Christensen-Daalsgard.
So all this gave us a pretty good look into the sun's interior and it was quite clear, that the observed solar parameters like, size, energy output, surface temperature must lead to certain Pressure, Temperature and Density values for the core corresponding to a fusing plasma.
But those theoretical predictions would imply the core-plasma to create neutrinos from nuclear reactions, which famously (wiki: Solar_neutrino_problem) were off by a factor of about 3. With the discovery of neutrino oscillations (wiki: Neutrino_oscillation) this problem was also solved in that the sun didn't produce too few neutrinos, but the produced neutrinos would simply change their types. After some distance from the sun those changes would redistribute the numbers from 3:0:0 for electron-myon-tau neutrinos to 1:1:1.
This problem persisted until approx. the year 2000.