In pure gold there is a markings like 24k,18k etc. In this method we can know the gold is pure or not. A metal tag has also uses in these type of golden necklace and the color of this tag is golden color. Another method is to recognize the pure gold is with the help of magnifying glass.
If it is genuine gold, there will be a stamp indicating the quality, so it might say "14k" or "24k", depending on the quality of the piece. If it is real gold, it will be stamped somewhere on the piece.