The thing about growing in pots—crops or ornamentals, and especially tomatoes—is the need for regular fertilizer in that restricted environment. Tomatoes are heavy feeders. Organic fertilizer is usually composed of source materials: bone meal, feather meal, rock phosphate and many others, which are applied once a year and gradually break down in garden soil throughout the season and convert into useable form. Not so useful in the artificial environment of pots where the roots, as Stone said, are constrained and benefit best from immediate-acting fertilizer applied at regular intervals.
Most sources will tell you that tomatoes require a minimum 5-gal pot, but that truly is "minimum' and not close to ideal to and will rarely provide a high yield. 10+ gal is better. I'm not saying it can't be done—there are plenty of YouTube videos demonstrating fantastic results—but you really have to give them constant attention, especially with consistent, regular watering, as Lynda noted.
I have limited space and have grown tomatoes in pots for several years with wildly varying success and I'm always experimenting. I grow only for myself, so I don't need much. Even so, I won't bother with 5 gal anymore. The effort to yield ratio isn't worth it. This year I've made ground space as well. Looking forward to it.