The Ralbag, that uber-rationalist medieval philosopher, says that when (if) we find conflicts between reason/science and faith, we must choose faith. Milchamos Hashem 1:14 (tr. Seymour Feldman, vol. 1 p. 226):
If anyone thinks that religious faith requires a conception of human perfection different from the one we have mentioned because of certain passages about the Garden of Eden and Gehenna in various Midrashim, Aggadot, and statements of the prophets, let him surely know that we have not assented to the view that our reason has suggested without determining its compatibility with our Torah. For adherence to reason is not permitted if it contradicts religious faith; indeed, if there is such [a contradiction], it is necessary to attribute this lack of agreement to our own inadequacy.