Religious dogma clashed with early science, but fossils and discoveries reshaped humanity’s understanding of Earth’s history.