The strange part of "toast" is not the bread. It is that the word for a slice of browned bread also became the word for a speech over a glass, and then for a person.
The bread comes first. English took the verb from Old French toster, which goes back to the Latin torrere, "to parch." By the early 1400s the noun meant bread browned by heat, and Etymonline says it first referred to something added to wine or ale.
Charred bread did sit at the bottom of glasses in those days. Why is less clear. An Oxford University Press blog post on the word says the toast may have added flavor, removed an unwanted taste, or hidden spoilage. It also notes that charcoal is not very effective against sour wine. So the popular line that it was a fix for bad wine is a guess, not a documented fact.
Etymonline dates the drinking sense to the 1690s. The Oxford English Dictionary's earliest example of a woman called "a toast" is from 1700, according to that blog post.
The usual explanation comes from Richard Steele's Tatler in 1709. In his story, an admirer at Bath drinks the health of a beauty from the water she stood in. A tipsy man offers to jump in and get "the toast," a pun on the custom of a toast at the bottom of the glass.
That anecdote is almost certainly too neat. The Oxford post argues that it did not start the sense, since it came after the 1700 citation, and calls it a tale invented in hindsight.
Etymonline dates the verb "to propose or drink a toast" to 1700. Toastmaster follows in 1749.
So the safe version is this. Bread was put in drinks, and the word later attached to a woman whose health was drunk and to the act of drinking to someone. Why a woman was compared to toast is still not settled.