Despite the tomato's botanical definition as a fruit, it's considered a vegetable by the U.S Supreme Court. Here's the timeline of how it happened.
1883
The Tariff Act of 1883 is signed into law by President Chester A. Arthur. It was a complex, unpopular, politically-driven piece of legislation that led to tariff changes on specific imported goods. Among the items with tariffs imposed were "vegetables in their natural state, or in salt or brine, not specially enumerated or provided for in this act, ten percentum ad valorem." In layman's terms, this meant that all unprocessed vegetables (except those specifically mentioned elsewhere), were subject to a tariff of ten percent their value. The act also contained a "free list" of items which were exempt from tariffs. Among these were "Fruits, green, ripe, or dried, not specially enumerated or provided for in this act."
1886
The Nix family attempts to import a load of tomatoes from the West Indies into New York. The collector at the port, Edward L. Hedden, charges them the 10% tariff on imported vegetables. The Nix protest, arguing that from a botanical standpoint, tomatoes are considered fruits and therefore exempt from tariffs. Hedden doesn't sway from his position.
1887
The Nix file suit against Hedden for the tariffs charged on their imported tomatoes.
April 1893
The Nix vs Hedden case makes it all the way to the Supreme Court. At the trial, the Nix's lawyers (the Plaintiffs) read aloud the dictionary definitions for fruits and vegetables. They then called two witnesses with 30 years' experience selling fruits and vegetables, asking them if the dictionary definitions differed from the definitions used in the trade and commerce business in 1883. The witnesses confirmed that in 1883 the definition for fruits (read as "the seed of plaints, or that part of plaints which contains the seed, and especially the juicy, pulpy products of certain plants, covering and containing the seed") were defined as such in matters of commerce.
In response, the Defense whipped out their dictionary and read the definitions for pea, eggplant, cucumber, squash, and pepper, all of which are commonly considered vegetables despite being defined botanically as fruits.
Neither side offered any further evidence.
May 1893
Since the terms fruits and vegetables hadn't received any special definitions within the context of commerce, as proven by the Plaintiff's witnesses, the court is allowed to regard the dictionary definitions as considerations and not as evidence. The ruling judge, Justice Gray, rules that tomatoes are to be regarded as vegetables in the context of trade, just as they are in the common language of the people. He states:
"Botanically speaking, tomatoes are the fruit of a vine, just as are cucumbers, squashes, beans, and peas. But in the common language of the people, whether sellers or consumers of provisions, all these are vegetables which are grown in kitchen gardens, and which, whether eaten cooked or raw, are, like potatoes, carrots, parsnips, turnips, beets, cauliflower, cabbage, celery, and lettuce, usually served at dinner in, with, or after the soup, fish, or meats which constitute the principal part of the repast, and not, like fruits generally, as dessert.
"The attempt to class tomatoes as fruit is not unlike a recent attempt to class beans as seeds, of which Mr. Justice Bradley, speaking for this court, said: 'We do not see why they should be classified as seeds, any more than walnuts should be so classified ... As an article of food on our tables, whether baked or boiled, or forming the basis of soup, they are used as a vegetable, as well when ripe as when green. This is the principal use to which they are put. Beyond the common knowledge which we have on this subject, very little evidence is necessary, or can be produced.'"
There we have it. For more on the history of tomatoes, check out the book Ripe: The Search for the Perfect Tomato, by Arthur Allen.