How are we to understand passages in the Bible which seem to contradict science? This is an excellent question. When addressing this issue there are two things to keep in mind.
First, science is often wrong. This especially true for new discoveries which are almost always misunderstood to some degree. But to the point of this question, all new discoveries mean what was previously taught was wrong. An obvious example is the Big Bang, which replaced the Newtonian model of the universe. After teaching a false theory of cosmology for over 300 years, science celebrated the Big Bang Theory. Yet history does not criticize science for over 300 years of teaching something which is now declared to be wrong.
To illustrate this issue by way of example, consider recall notices automobile makers send out. The principle is simple: the car is unsafe or fails to properly perform and the manufacturer has an obligation to correct the flaw. Do colleges recall degrees for teaching something which is discovered to be incorrect? Do professors reach out to former students to advise them they were given wrong information? When textbooks are rewritten with correct information, are previous students given replacements at no cost?
In some cases, like the cosmology of the Newtonian model, science was known to be wrong.
1Further, science was not simply wrong by providing an inaccurate natural explanation; the error was compounded by claiming the Biblical account was inaccurate. Not only were there no recalls or replacement books: there was no mea culpa. When Nobel Prizes are given there is never an accompanying apology or retraction for wrongly claiming the Biblical account was in error.
Second, scientific accuracy, or lack there of, should be determined from the original language, not translations. I am quite certain that had science not misinformed the King James translators by teaching the Newtonian model of cosmology, many passages would have been translated differently. In which case the accuracy of Biblical cosmology should cause all readers to ask: how did scientifically illiterate writers get it right long before science understood the physics which prove it is right? Sadly, the first translations into English were negatively influenced by ill-informed science.
Arguably, some things are common knowledge and scientific accuracy is expected:
He set the earth on its foundations; it can never be moved. (Psalm 104:5 NIV)
As some answers discuss, the "inaccuracy" can be dismissed on the grounds or poetic language or the use of a metaphor or figure of speech. After all, something written to describe something else using figures of speech should not be judged as inaccurate because the figures of speech are not literally correct.
On the other hand, if the original statement, including the figure of speech, is from God, can't we also expect scientifically accuracy? When a translator approaches a text, what is their translation philosophy? Scientific accuracy is not likely to be at the top of the list, nor should it be. That is, a translator should not render a passage in a way which compromises the most important sense in order to produce a rendering which satisfies science.
However, when one chooses to throw down the gauntlet and claim the Bible lacks scientific accuracy, then it is fair to respond to such claims by re-examining the passage with scientific accuracy in mind.
יסד־ארץ על־מכוניה בל־תמוט עולם ועד (Psalm 104:5)
laid the earth upon the foundations of so not it should be moved forever and ever
What are the foundations? The word in question is מָכוֹן which is typically understood as place and more precisely, as a dwelling place:
I have indeed built you an exalted house, a place for you to dwell in forever.” (1 Kings 8:13)
When dedicating the Temple, Solomon uses מָכוֹן four times (8:13, 39, 43, and 49). The meaning is obvious: the Temple will be a dwelling place for the LORD.
As we think of the earth's dwelling place in the solar system, we must admit a proper description should be written as plural. Since the earth orbits the sun, a singular dwelling would be scientifically inaccurate. The earth's position relative to the sun is one of both motion and stability. The earth is in motion but it does not move about randomly. The phase is scientifically accurate if one chooses to understand it is speaking of an unmovable dwelling place, not a dwelling place which does not move.
In addition, the word move is מוֹט. The first time this is used in Leviticus:
“If your brother becomes poor and cannot maintain himself with you, you shall support him as though he were a stranger and a sojourner, and he shall live with you. (Leviticus 25:35)
וכי־ימוך אחיך ומטה ידו עמך והחזקת בו גר ותושב וחי עמך
In Leviticus, וּמָ֥טָה challenges translators. How is one to understand a brother's "lack of movement?" Falls into poverty or cannot maintain himself work, but with the earth's orbit in mind one might better understand the sense is to fall out of place or move away. In the same way the earth will not leave it's orbit, a poor brother is to be supported so they do not have to move away.
One may also consider the accuracy of the first word יסד which is understood as laid.
He laid the earth in its dwelling places [its orbit] which will never be moved.
Is there any scientific theory which predicts the earth leaving its orbit and moving to a different place in the solar system or even another system?
Actually, the phrase He laid... follows Genesis 1 in which the earth is created before the sun, and the moon, and the stars. Isn't that good for a laugh! But what does science teach about the formation of the earth? Since only hydrogen and helium came from the Big Bang all other elements must have originated in stars. When these stars exploded, all other elements were strewn throughout the universe. In other words, the stars which now give light to the earth could not be the stars which gave the elements which make up the earth, according to scientific theory.
The Biblical sequence is declared absurdly wrong, but the scientific theory which is deemed correct "borrows" the sequence of the formation of matter from the Bible.
Science now teaches the moon was formed after a collision between a Mars sized object and the earth. Here is something to consider. What if science decides it was not the object traveling through space which collided with the earth; it was the earth which was traveling through the solar system when it collided with the object. As a result of the collision, the earth is then found in a fixed position. When He laid the earth in its dwelling places. There is a Nobel Prize just waiting for the next person to prove the Bible's scientific accuracy. Let's pray the winner stops the plagiarism and gives credit to where the idea was first written.
The sun rises and the sun sets, and hurries back to where it rises.
If ever one should show a little grace, this passage is the poster child. After all, the passage is not only poetic, it personifies the sun. No one supposes the writer understood the sun as a person. Do we criticize Shakespeare or Longfellow for taking poetic license in describing nature?
But let's take up the gauntlet science may throw down:
וזרח השמש ובא השמש ואל־מקומו שואף זורח הוא שם
and rises the sun and goes down the sun, and to the place hastens arose it where
First, since the terms "sunrise" and "sunset" are still in use and mean the same now as then, science has no right to declare the first part of the passage is inaccurate. And rise the sun and goes the down sun is describing natural events as they are experienced by mankind. The same terminology continues to this day. The weather report will detail the time of sunrise and sunset.
Of course the sun does not move, it stays in one place, an idea which can be found in what follows: ואל־מקומו is understood as and to the place. However, if we dig deeper into the meaning we could understand the phrase as and against the standing in place since אל can mean against and מקומו can describe a standing place.
The next two words are verbs שואף זורח, literally hastening arose. But the most common meaning of שואף is to swallow up. So we could see the passage as expressing two separate ideas, the first a common figure of speech and the second a scientifically accurate statement of what takes place:
(A) the sun rise and the sun goes down
(B) against the standing in place it swallows up the place which it rose
First, I would point out anyone who experienced the loss of ten children, destruction of most of their worldly possessions, and a horrific and painful skin disease, should be not critiqued for scientifically accuracy.
Second, what is recorded is what Job believes. If one sees scientific inaccuracies in Job's understanding of the physical world, how is that any different from Isaac Newton's wrong understanding of the universe? Science is never critiqued for teaching "facts" which are not. Why must a grieving man's wrong understanding of the universe be taken as a Biblical inaccuracy? Can't we put this in the same category as others incorrect knowledge of nature?
If one chooses to set aside the grace extended to Newton and all scientists who have ever been wrong, we can examine what Job says with the heartless objectivity of science:
המרגיז ארץ ממקומה ועמודיה יתפלצון
literal: he shakes earth out of its place and its pillars tremble
First, ארץ is just earth, not the earth, and so it can mean land, country, even just the soil. Second, pillars need not be solid or even immovable columns. The most frequent use is to describe the supernatural physical manifestations of the LORD which guided the Israelites from Egypt:
And the LORD went before them by day in a pillar of cloud to lead them along the way, and by night in a pillar of fire to give them light, that they might travel by day and by night. (Exodus 13:21)
The word which is translated as trembles is פָּלַץ, a hapax legomenon. It could mean tremble but it is fair to say Job did not use the common word for shake or tremble. Rather he has a different type of "tremble" in mind. Perhaps Job is describing God in terms of an earthquake, or a volcanic eruption, or the one responsible for the rise and fall of earthly empires. The actual language could be coerced into any of these interpretations.
But what exactly is Job saying? Is he, like Isaac Newton ignorant of correct cosmology? Is he just "running his mouth" without understanding what he is saying?
...Therefore I have uttered what I did not understand, things too wonderful for me, which I did not know. (Job 42:3)
Regardless of any scientific inaccuracy, at least Job had sense enough to admit he uttered things which he did not understand. Can the same be said of Isaac Newton?
1. The orbit of Mercury was known to violate Newton's laws of motion.