Abarim Publications' online Biblical Hebrew Dictionary
The Bible's common word for dog, כלב (keleb), comes from the root כלב (klb). What that root means is unknown and some scholars suggest that it was formed after the sound that a dog makes (the Hebrew equivalent of woof!).
Dogs in the Bible are always vile (Proverbs 26:11), aggressive (Jeremiah 15:3), worthless (1 Samuel 17:43), or worthy of distrust (Psalm 59:6). In the New Testament too dogs are displayed negative, see for instance Revelation 22:15 or Matthew 15:26 (Mark 7:27).
A word that both BDB Theological Dictionary and HAW Theological Wordbook of the Old Testament list under the root כלב (klb), but of which the connection to this root is 'dubious' (says BDB Theological Dictionary), is כלוב (kelub), denoting a basket and a cage, specifically with contents (birds in Jeremiah 5:27; fruit in Amos 8:1).
Whatever the etymological origins of these words are, the result of them looking alike is quite revealing. Even though the Biblical tradition loathes dogs, the Israelites were not unfamiliar with their services or companionship. Job 30:1 speaks of shepherd dogs and in Matthew 15:27 dogs are reported to exist under the table from which people ate. Certainly, the Israelites knew that dogs could learn many a trick or skill, or even show compassion and affection for its master, and this in contrast to other animals that lived around the house.
If indeed the Hebrew root כלב (klb) is onomatopoeic (= designed to imitate the sound it denotes), and כלוב (kelub) was imported from cognate languages, these transactions may have been lubricated by the notion that dogs may appear to be endowed with reason, like a basket that contains fruit or a cage that contains birds. On top of this, the word כלב (keleb) may be (mistakenly) seen as a combination of the particle כ (ke), meaning 'like' or 'as if,' and the noun לב (leb), meaning heart, understanding or courage. That way the word כלב (keleb = dog) means 'as if it has a heart' or 'as if it understands.'
This proposal is an admitted long shot, but to shoot even longer: the Greek word for dog is κυων (kuon), while the verb κυω (kuo) or κυεω (kueo) means to be or cause pregnancy, and is at times used for a mind pregnant with thoughts ("all men are pregnant, Socrates, both in body and in soul"; Plato, Symposium 206c). Also see the noun לבי (lebi), which looks like an adjective derived from לב (leb), and which means lion.