Sweetness of wine
The subjective sweetness of a wine is determined by the interaction of several factors, including the amount of sugar in the wine, but also the relative levels of alcohol, acids, and tannins. Briefly: sugars and alcohol enhance a wine's sweetness; acids (sourness) and bitter tannins counteract it. These principles are outlined in the classic 1987 work by Émile Peynaud, The Taste of Wine.
History
Vintage: the Story of Wine, by Hugh Johnson, presents several methods that have been used throughout history to sweeten wine. The most common way was to harvest the grapes as late as possible. This method was advocated by Virgil and Martial in Roman times. In contrast, the ancient Greeks would harvest the grapes early, to preserve some of their acidity, and then leave them in the sun for a few days to allow them to shrivel and concentrate the sugar. In Crete, a similar effect was achieved by twisting the stalks of the grape to deprive them of sap and letting them dry on the vine—a method that produced passum and the modern Italian equivalent, passito.