Honey isn't only the sweetest snack ever, it also has quite the reputation as a anti-bacterial agent. In fact, people used to put honey on cuts to stop infections from spreading and even today hospitals use derivatives of honey for the same purpose. But what makes honey so potent against bacteria?
One of the characteristics of honey that makes it so bacteria-resistant is its sugar. Consisting of mostly glucose and fructose, honey contains more sugar than could normally dissolve at the temperature which its produced at (thank you bees!). This property allows honey to suck up the liquid within a bacterium (via osmosis) and because there is so little water in honey, the bacterium cannot survive within the honey.
Honey also has glucose oxidase, a compound that bacteria dislike because it turns glucose into gluconic acid and hydrogen peroxide, both of which make living conditions difficult (read: impossible) within honey. Bacteria need a pH of roughly 7 and the gluconic acid gives honey a pH of roughly 4, while hydrogen peroxide essentially kills cells.
But the most important aspect of honey is that bees actually put antibiotics into the honey they make, more specifically an antibiotic called Bee Defensin-1. Bees themselves use this antibiotic to protect themselves from bacteria that may be in the hive, and because it's produced in the same gland that bees use to make honey, some of it ends up in the honey we eat!