Because of the variation in law among states, even that definition is too specific to be entirely correct. For example, in California, there is no real difference between a city and a town; you can (and do) have incorporated "towns". In fact, that's true in some other states. Then there is my former home state of Ohio, municipal corporations can be either a "city" or a "village" depending on population, with a requirement of at least 5,000 people at a census to become a city; an unincorporated area is a "township", not a "town", and does depend on county services (at least in some areas). I used to live in a township in Ohio that had over 10,000 people, but that didn't make it a city -- because it wasn't incorporated (and there wasn't any push to incorporate, because half of the population of the township was included in the school district of a neighboring city that traditionally had good schools, and those people didn't want any change to the status quo).
http://codes.ohio.gov/orc/703
But, another exception: in New England, towns are incorporated (the town of Lexington, Massachusetts, for example, was incorporated in 1713) and generally provide all government services, counties are only ceremonial, and there is no size limit on a town; the real difference (at least in Massachusetts) is that cities are governed by mayor-council; while towns are governed by town meetings (which is why the town of Framingham, MA, with almost 70,000 people, narrowly voted this spring to give up its title of "the largest town in America" and become a city).
https://news.wgbh.org/2016/12/19/local-news/framingham-americas-largest-town-seeks-city-status
All this really shows is that the term "town" doesn't have anything resembling a clearly defined meaning, so the only way to really answer this question is to note that "city" does have a more-or-less-consistent meaning: an incorporated area that has a specifically-defined governing status under state law, and which may be separated from other incorporated areas by a population requirement (as in Ohio) or may require the consent of the electorate (as in Massachusetts). So to become a city, an area first MUST incorporate, and then it must meet whatever additional requirements are set out by its state for city status.