The gravity equation is a current workhorse of empirical trade theory. It is generally acknowledged that this theory, which relates the extent of trade between countries to their respective sizes, distances, and relative trade barriers, was first developed by Jan Tinbergen in 1962. Acceptance of the gravity model as part of the discipline's core was limited by its scant theoretical foundation for the first 40 years of its existence. This paper finds that a theory of trade gravity was first developed by Adam Smith in The Wealth of Nations. Moreover, it is shown that Smith's statement of a proportional relation between economic size and distance came about as an application of his general theory of differential capital productivity in different economic sectors, and his elaboration of a theory of the gains from trade originated by David Hume. It is further shown that Smith had an explanation of the size of border affects in trade volumes, and a gravity theory of trade restrictions.Something else for which Smith was ahead of his time.