While there are many methods of detecting fake precious metals, there are realistically only two options available for verifying the marked fineness of metal as being reasonably accurate: assaying the metal (which requires destroying it), or using X-ray fluorescence (XRF). XRF will measure only the outermost portion of the piece of metal and so may get misled by thick plating.
That becomes a concern because it would be possible for an unscrupulous refiner to produce precious metals bars that are slightly less pure than marked on the bar. A refiner doing $1 billion of business each year that marked .980 pure bars as .999 fine would make about an extra $20 million in profit. In the United States, the actual purity of gold articles must be no more than .003 less than the marked purity (e.g. .996 fine for gold marked .999 fine), and the actual purity of silver articles must be no more than .004 less than the marked purity.