Grapes are a Hardmodefood item that grant the Plenty Satisfiedbuff. This lasts for 16 minutes, but can be canceled at any time by right-clicking the icon (), by selecting the icon and canceling it in the equipment menu (), or by double-tapping the buff icon ().
It is advised to collect 2 grapes and craft the Grape Juice, as it gives the best variation of the Well Fed buff and is one of the easiest ones to get.
Despite real-world grapes being clearly a fruit, Grapes in Terraria do not fit into the Fruits category. They cannot be used to craft Fruit Juice or Fruit Salad, are not dropped from Trees, and both they and their juice give far better buffs than the members of that category. Also, researching Grapes requires 10 of them, unlike all the other fruits that require only 5.
The item dropping from Giant Flying Foxes is likely a reference to the fable of "The Fox and the Grapes", in which a fox attempts to reach some Grapes on a vine, but ultimately decides that they are undesirable.
In the real world, Grapes originated from the Mediterranean and Central Asia and are a major ingredient in wine.