The expression by (or with) the skin of one's teeth, which means 'by an extremely narrow margin; just barely; scarcely' is an example of a literal translation of a phrase in another language. It's also another example of a Biblical expression gaining currency in mainstream usage.
The Biblical source of this phrase is the following passage, where Job is complaining about how illness has ravaged his body: "My bone cleaveth to my skin and to my flesh, and I am escaped with the skin of my teeth" (Job xix.20, in the King James Version). The point here is that Job is so sick that there's nothing left to his body. The passage is rendered differently in other translations; the Douay Bible, for example, which is an English translation of the Vulgate (St. Jerome's fourth-century Latin translation), gives: "My bone hath cleaved to my skin, and nothing but lips are left about my teeth."
The phrase, which first appears in English in a mid-sixteenth-century translation of the Bible, does not appear to become common until the nineteenth century. At this point by the skin of one's teeth is the usual form, as if the teeth actually have skin that is so fine you can barely tell. (An interesting parallel is the nineteenth-century Americanism fine as frog's hair, meaning 'very fine', based on a similar assumption.)