Replicators required energy to work and the materials to build, plus replicators could not produce energy itself, and for those reasons you can't solely have a economy based entirely on replicators themselves. You need fuel sources: hydrogen (for nuclear fusion; something which is used a lot in Star Trek -- think impulse drives), deuterium and whatever solid-state or gaseous energy resources are out there. Plus the various metals to build a replicator.
Furthermore replicators are very energy consuming so in terms of mining and farming, if it expends less energy to extract minerals from planetoids and planting crops or growing them in hydroponic facilities, then that's what will happen in such an economy. In any time, place or situation, the means to extract the most resources with the least amount of energy expended will nearly always be chosen.
On the subject of latinum, perhaps it can be replicated however replicated latinum does not possess all the qualities of real latinum. Consider synthetic diamonds; yes we can produce them, but synthetic diamonds do not have internal refractive light patterns of real diamonds and such a quality is one which adds considerably to a real diamond's value. So if replicated latinum is not as valuable as real latinum, then real latinum will be used for a) it's appeal (just like our race's fascination with gold and diamonds), and b) it's scarcity thus making it very valuable.
Finally replicators don't duplicate objects and materials, they assemble them according to a specific set of programs. This is an important difference because it explains why characters complain about replicated food, or why replicators can't make certain items or complex ones. If a device could perfectly duplicate objects, would that make it a duplicator?