This is really all we know:
But Thorin I his son removed and went into the far North to the Grey Mountains, where most of Durin's folk were now gathering; for those mountains were rich and little explored. But there were dragons in the wastes beyond; and after many years they became strong again and multiplied, and they made war on the Dwarves, and plundered their works.
[..]
So the rumour of the wealth of Erebor spread abroad and reached the ears of the dragons, and at last Smaug the Golden, greatest of the dragons of his day, arose and without warning came against King Thrór and descended on the Mountain in flames.
-- Lord of The Rings, Appendix A, section III
The dragons had been at war with the dwarves in the Grey Mountains since before Erebor became fantastically rich - and the dwarves had gone to the Grey Mountains from Erebor (after mining the Arkenstone).
So from that we can conclude that either the treasures of Erebor must have been much smaller than those the dwarves found in the Grey Mountains, and the dragons would only come down after all of those had been taken, or Erebor's gold and gem veins lay deep and had been exploited only for a relatively short time, until eventually Smaug heard of them (presumably from Dwarves in the Grey Mountains who traded with Erebor).
Keep in mind that Dragons live basically forever, so a century or two means little to them.