Sorry, other poster is dead wrong, tomatoes were eaten fresh only rarely before the invention of commercial canning, getting down on fresh tomatoes is a pretty modern thing, your pre-canning tomato breeds would not make for tasty fresh eating, pretty acidic. But they were certainly preserved, it's a smart question you've asked! What they did was make a paste of tomatoes, called conserva. I have previously written here about how they made (and make!) conserva, including a video!
However, in the era of conserva (and in Italy today, depending on region of course) tomatoes were a minor vegetable. For a little on how the tomato came to be seen as #1 Most Italian Food, read here. (Despite it not being my specialità at all, I've apparently made myself a little side career in tomato history here, because people ask about it so often!)