Adam Smith distinguished the market price of a good from its “natural” price, where the latter in Smith’s words is “the central price, to which the prices of all commodities are continually gravitating.” It seems, here, that the natural price is the same as what we today call the long-run equilibrium price in a competitive market.
Smith already had a supply/demand explanation of the movement of the market price, which is what one observes in the market. Excess supply would cause the market price to fall, while excess demand would cause it to rise. Thus, at equilibrium, where supply equals demand, the market price would tend to stabilize.
Smith also broke down the market price of a commodity into its factor-price components – wages, profits, and rents (which are simply the earnings of the production inputs of labor, capital, and land).
Because of competition among producers (and perhaps because wages and rents are not instantaneously adjusted), Smith saw that gyrations of the market price would correlate with movements of profits, and profits/losses provided a signal to producers to enter/exit the market. This is, of course, the Invisible Hand explanation of the working of the market mechanism. The invisible hand would guide people to produce what is demanded in the market, according to the signaling of profits.