mid-15c., apparently from Old French barater "to barter, cheat, deceive, haggle" (also, "to have sexual intercourse"), 12c., of uncertain origin, perhaps from a Celtic language (cf. Irish brath "treachery"). Connection between "trading" and "cheating" exists in several languages. Related: Bartered; bartering. The noun is first recorded 1590s, from the verb.
On paper, this sounds a bit like delayed barter, but it bears some significant differences. For one thing, it’s much more efficient than Smith’s idea of a barter system, since it doesn’t depend on each person simultaneously having what the other wants. It’s also not tit for tat: No one ever assigns a specific value to the meat or cake or house-building labor, meaning debts can’t be transferred.