Yes, tomato plants can get quite big, and you need to consider space for both the foliage (leaves and fruit), as well as the root mass. Personally I wouldn't use anything less than five gallons of root space for growing tomato. If it were me I would build a system like this
easy to build hydro system for growing just about any large plant like tomato's. You can easily customize it to any space you have to work with.