Technically speaking, the earth contains enough gold to cover it, but practically speaking, it would not be feasible or practical to do so.
Estimates of the total amount of gold on earth vary, but scientists believe that there is between 155,000 and 2.5 million metric tons of gold in the earth's crust alone. This does not include the gold that may be found in the earth's mantle or core, as they are impossible to extract with our current technology.
If the earth's surface were to be covered in gold, it would require at least 2.5 million metric tons of the precious metal. However, this would be completely impractical for a number of reasons.
Firstly, gold is a finite resource, and covering the earth in it would completely deplete the world's supply. Secondly, the transportation and handling of that amount of gold would be a monumental task, requiring vast amounts of energy and resources.
Moreover, the economic implications of such an endeavor are staggering. The current market value of gold is around $1,700 per ounce, meaning that covering the earth in gold would cost in the trillions of dollars.
In summary, while it is technically possible to cover the earth in gold, it is neither practical nor feasible to do so.