The rock that appears to be gold is actually a granite boulder that is covered with gold leaf applied to the rock by Buddhist devotees. They also leave paper money on sticks between the rock and its platform, which is used to maintain the site. Although the money is left like this to stop it blowing away, it does look like an attempt to help the rock keep on its perch, too.
The main legend associated with the rock and the pagoda is that the Buddha, on one of his visits, gave a single strand of his hair to the local hermit, Taik Tha. The hermit, when age was about to overcome him, gave the strand to the King who wished the hair to be enshrined. Yet a hair can blow away with the wind, so the King located a boulder at the bottom of the sea and transported it to Kyaiktiyo (this name literally means pagoda on a hermit’s head).
The Republic of the Union of Myanmar