The change from subsistence farming
When farms were 80 to 160 acres, such farms mostly only supported the families living on them. Starting in the late 1800s with the rise of agricultural science and industrialization allowing farms to mechanize, farms began to feed others, first the US and later the rest of the world.
Today a typical farm is just like any moderate-sized business. It typically takes a couple of million in land, equipment, and livestock to make a go of it. Most farmers start out by renting a little land, and work their way up from there. Families with many kids have to deal with splitting up the inheritance, which makes it really hard to get started. Getting farm loans today is also a lot tougher because of the bank collapse in 2008.
You are right about the consolidation of farms causing fewer farmers and hence less need for the services of small towns. Last I saw, only about 2% of the US population was directly involved in farming, and I believe that included migrant farm workers. That said, global food shortages promise that farming will once again be profitable. Farmers will just have to adjust to being further from services, but the life itself will probably make a comeback.