"yellow bitter liquid secreted by the liver that aids in digestion," 1660s, from French bile (17c.) "bile," also, informally, "anger," from Latin bilis "fluid secreted by the liver," also in old medicine one of the four humors (also known as choler), thus "bitterness of feeling, peevishness," supposedly caused by excess of bile (especially as black bile, 1797).
The Latin word is of uncertain origin. De Vaan notes apparent cognates for it in British Celtic (Welsh bustl, Middle Cornish bystel, Breton bestl "gall, bile") and writes, "since this word is only found in Italic and Celtic, it is possible that the word is not PIE." But, he adds, if it was borrowed from Celtic into Italic it might be from PIE root *bheid- "to split," which in Germanic has come to meaning "bite," and he notes that "'bile' is a biting substance."