Follow-up: the musical Joseph and the Amazing Technicolor Dreamcoat (based on Genesis 41) mentions that ancient Egypt had grain stored for a seven year famine. Was this architecturally feasible?
There is, of course, no single answer to so broad a question. Even in a given place and time, the amount of food stored in a premodern society's cities would vary with the season and the circumstances. Any sense of quantity is also difficult to glean from the sources, which tend (at least in the Greco-Roman contexts I know best) to refer only in general terms to sufficiency or scarcity of food. In the very broadest sense, the answer to your question is "yes, usually" - premodern transportation networks were slow and prone to breakdown, and it was necessary to have a surplus on hand to avoid shortage. But for any given place and time, this glib reply has to be qualified with a explanation of who was doing all the storage (imperial / civic officials, wealthy individuals, etc.), how it was customarily distributed, and how often the system broke down. In the classical world, at least, we usually have only an impressionistic understanding of those critical details.
So to focus on the classical world (as I must), can we tell how much food was stored in Greek and Roman cities? Knowing that the vast majority of the calories the Greeks and Romans consumed came from cereals, we can estimate how much grain was needed to sustain a population of a given size. We also know something about the colossal storage facilities of the city of Rome (more on those in a moment). But Rome was an extremely unusual case, by virtue both of its size and of the imperial government's supervision of the grain market there. Large urban granaries have been discovered elsewhere - there are, for example, well-preserved examples in the harbor of Andriake (modern Turkey) - but are much less common archaeologically than you might expect.
The reason it is so difficult to find archaeological traces of large Greco-Roman grain storage facilities is simple: most cities were quite small (10,000 inhabitants or fewer), were supplied primarily by the farms in their hinterlands, and had a grain market that was - at least in normal years - managed by small-scale private merchants. In this sort of system, a considerable amount of harvested grain was always kept in the countryside (wealthy landowners, in particular, often had a healthy surplus in their barns), and urban storage facilities consisted of small warehouses belonging to individual grain merchants. Although we might be able to guess at the storage capacity of the system - that is, of the amount of grain available in both local barns and urban warehouses - from the speed with which a bad harvest was followed by food shortage, this sort of estimation is extremely approximate, and ignores the facts (a) that grain merchants and wealthy landowners tended to hoard grain in times of shortage and (b) that the typical response of grain merchants in a time of shortage was simply to buy grain from elsewhere, and sell it for an inflated price.
In a normal year, how much grain was available to a given city? If properly stored, grain can be kept for years without spoiling. The facilities for keeping large quantities, however, were only available to large landowners and prosperous grain merchants, and the amount they stored would have varied considerably from year to year. After a series of bumper harvests, there might be a two-year surplus in the system. In a time of dearth, not so much.
As I said earlier, absolute numbers are elusive. Some work, however, has been done to estimate the gargantuan amount of grain shipped to (and stored in) Rome every year. Taking (as most modern scholars do) one million people as a reasonable estimate for the population of early imperial Rome, it has been estimated that 150,000 - 250,000 tons of grain were shipped to the city annually. That, of course, is a lot of grain. But how much was actually kept in and around the city at a given time? Since few ships sailed the Mediterranean between November and March, there must have been the capacity to store at least six months' worth - and probably, to avoid the risk of shortage, considerably more. There were enormous granaries (mostly, by the imperial era, state-owned) both in Ostia (Rome's harbor) and along the Tiber in Rome itself. In some periods, at least, the amount of grain held in these facilities was enormous; if we can believe the (always suspect) Historia Augusta, the emperor Septimius Severus stockpiled a "surplus of grain to the amount of seven years' tribute, or enough to distribute seventy-five thousand pecks a day" (23.2).
All of this is circuitous way of saying that, whenever possible, classical cities had a much larger amount of food in their immediate vicinity than their modern counterparts, which can rely on a sophisticated and global supply network.