The reason latinum was so valuable is because it couldn't be made in a replicator for hand wavey reasons. Gold could be and therefore its value became the energy cost to produce it in a replicator, the same as anything else really. Latinum was a scarce material in an otherwise post scarcity society.