Tomatoes are so ubiquitous in Israeli cuisine that you might think that the Hebrew word for them, agvania עגבניה, is as old as the language itself. But the word is much more recent, and the story is actually so interesting that the linguist Reuven Sivan wrote a booklet about it in 1971 for the Academy of the Hebrew Language.
He begins by pointing out that the tomato was first brought to Europe from its native South America in the 16th century, but the Europeans didn't eat it at first. Some thought that it might contain poison like many of its relatives in the nightshade family, or that it had aphrodisiac effects like its cousin the mandrake. So it was primarily used for decorative purposes until the 19th century. The Italians were the first Europeans to eat it extensively, and from there it spread throughout Europe and the Middle East. Philologos discusses in more detail about how Eastern Europe received the tomato later, with the Jews maintaining a high degree of suspicion about them. In fact, they called them "treyf apples" - as if they weren't kosher at all (this concern reappeared in more recent times). Sivan says that one of the reason for this title was a concern that they contained actual blood. There was no taboo against tomatoes in Eretz Yisrael, and he provides a number of entertaining stories about individuals (including rabbis) who came to Israel in the end of the 19th and beginning of the 20th century and had serious concerns about eating tomatoes, but the locals convinced them they were fine. Some of them later came back to Europe and either had to eat their new favorite food privately or were castigated for eating it in public.
How the tomato was viewed affected its name as well. While the English word "tomato" comes from the Aztec name, the European names tended to describe the fruit. As Philologos writes:
An alternate theory (which Sivan rejects) is that the tomato was first known in Italian as a "Moor apple" - pomo dei Mori " (they were brought from Africa), and then became "pomi d'amore" - "love apple", and finally "pomodoro" - "golden apple."
One of the tomato’s effects was thought to be aphrodisiac; thus, already in the 16th century we find it referred to in English as a “love apple,” a term echoed by the now equally archaic German Liebesapfel and French pomme d’amour. But the first-known botanical description of the tomato, published in Latin in 1544 by the Italian Piero Andrea Mattioli, called it, because of its yellowish-red color, not a “love apple” but a “golden apple,” malum aureum. ... Malum aureum was then translated into Italian as pomo d’oro, which became pomme d’or in French and passed from French into Polish as pomedor.
Whatever the origin, the name pomodoro became bandora in Arabic, and from here Ben Yehuda suggested giving the name badura בדורה as the Hebrew version. However, this was one of the linguistic battles that Ben Yehuda did not win. A different name was coined in 1886 by Rabbi Yechiel Michel Pines, and promoted by his son-in-law Dr. David Yellin. Instead of using a word like badura which ultimately had a non-Semitic origin, they preferred a Hebrew word that reflected the European "love apple" - agbanit עגבנית, which later shows up as agbaniya, and now as agvania. The root עגב means "to love, desire", is the root of the Hebrew name for syphilis agevet עגבת, and according to Klein, perhaps ugav עוגב - "flute" as well:
Probably derived from base עגב, hence literally meaning 'instrument of love', and so called in allusion to its insinuating tunes.
Ben Yehuda found this rather vulgar, and tried unsuccessfully to prevent its use, as Robert St. John describes in Tongue of the Prophets:
Generally the Ben Yehuda "army" won its word battles, and most of the father's creations or discoveries were accepted, but some few words were so completely rejected that as years went by the only people who ever used them were the lexicographer himself and members of his own family. One such word was the one he introduced for "tomato." The common word already in use was agbanit, from a root which meant "to love sensuously." Ben Yehuda felt that a better word was needed, so he went back to colloquial Arabic and coined the word badurah.
After it had been announced in the paper, "the army" received its marching orders. Henceforth, if any Ben Yehuda went into a shop to purchase this vegetable, he was to ask for a badurah, and if the shopkeeper seemed perplexed, he was to be given a little lesson in modern Hebrew and was to be introduced formally to badurah.
Such tactics generally succeeded, but after many years of proselytizing, the only shoppers in Jerusalem who ever called a tomato a badurah were members of the Ben Yehuda family.
Sivan notes that other, less "explicit" names were suggested at the time: sumkaniya סומקנייה (from sumak סומק - "red"), ahavaniya אהבנייה (from ahav אהב - "love") or tama תמה (not sure about this one, perhaps from תם - "perfect" or תמה - "amazed".) In any case, none of these were adopted either.
Sivan mentions that the tomato doesn't actually have any aphrodisiac properties. However, the European sailors were likely lacking in vitamin C, so eating the healthy tomato may have returned some of their strength, leading to their mistaken conclusion. In any case, we do see that both the fruit, and its Hebrew name agvaniya proved to be so seductive that they both won out over strong opposing forces...