Yes, tomatoes and potatoes were considered toxic for a long time, because they belong to the same family as a bunch of very toxic plants (such as the belladona), and even with tomatoes and potatoes, most parts of the plants are toxic anyway (anything except the parts we eat, actually).