A large fraction of microbial life on earth exists in complex communities where metabolic exchange is vital. Microbes trade essential resources to promote their own growth in an analogous way to countries that exchange goods in modern economic markets. Inspired by these similarities, we developed a framework based on general equilibrium theory (GET) from economics to predict the population dynamics of trading microbial communities. Our biotic GET (BGET) model provides an a priori theory of the growth benefits of microbial trade, yielding several novel insights relevant to understanding microbial ecology and engineering synthetic communities. We find that the economic concept of comparative advantage is a necessary condition for mutualistic trade. Our model suggests that microbial communities can grow faster when species are unable to produce essential resources that are obtained through trade, thereby promoting metabolic specialization and increased intercellular exchange. Furthermore, we find that species engaged in trade exhibit a fundamental tradeoff between growth rate and relative population abundance, and that different environments that put greater pressure on group selection versus individual selection will promote varying strategies along this growth-abundance spectrum. We experimentally tested this tradeoff using a synthetic consortium of Escherichia coli cells and found the results match the predictions of the model. This framework provides a foundation to study natural and engineered microbial communities through a new lens based on economic theories developed over the past century.