Old English beste, reduced by assimilation of -t- from earlier Old English betst "of the highest quality or standing, first, in the best manner." This originally was the superlative of bōt "remedy, reparation" (Middle English bote "advantage, help, profit"), a word now surviving in its simple form only in the expression to boot (see boot (n.2)). Its comparative, better, and superlative, best, have been transferred to good (and in some cases well).
Old English bōt is from Proto-Germanic root *bat-, with comparative *batizon and superlative *batistaz. The superlative form is the source also of Old Frisian, Old Saxon, Middle Dutch best, Old High German bezzist, German best, Old Norse beztr, Gothic batists. Also in Old English as an adverb, "in the most excellent manner."
The best-laid schemes o' mice an' men
Gang aft agley,
An' lea'e us nought but grief an' pain,
For promis'd joy!
[Burns, from "To a Mouse, on Turning Her Up in Her Nest With the Plough, November, 1785"]
From late Old English as "of greatest advantage, most suitable." Best-seller as short for "best-selling book" is from 1889, apparently originally in the publishing trade; best friend was in Chaucer (late 14c.). Best girl is first attested 1881, American English; best man is 1814, originally Scottish, replacing groomsman.
c. 1200, "that which is best," from best (adj.). From c. 1300 as "all that one can do;" 1570s as "highest possible state." From 1790 as "best clothes." At best "in the utmost degree" is from early 14c. For the best "tending to the best results" is from late 14c. To make the best of "use to best advantage" is from 1620s; to get or have the best of "the advantage over" (in a contest, etc.) is from 1640s. To be able to do something with the best of them is recorded by 1748.