My humble opinion is that what you call science is not so. In many things Chazal did not know the truth, yet the Torah was intended to be codified and fashioned into a practical Torah, halkacha lemeisa, which is impossible unless one takes a stand about the scientific truth of what is happening. Hence we have treifos that live just fine, and others, that die, yet are not considered treifos. This ought not to be considered an error; it is the effect of Hashem telling fallible humans to codify the Torah. Such is Hashem's will. (Chazon Ish. He elaborates that there was even a certain period to do this codifying; the two thousand years of Torah, he calls them)
So I would say that there is no science in the gemara; it is instead "halachik science", an auxiliary to Torah.
The Rambam on health, however, is not Torah.