Kinkakuji -- which means "Deer Garden Pavilion" -- was built in 1397 as a retirement home for Shogun Ashikaga Yoshimitsu. After the Shogun died in 1406, the pavilion became a Rinzai Zen temple. The original temple was destroyed later in the 15th century, and rebuilt.
A disturbed monk burned the temple to its foundations in 1950. The current structure was built in 1955. It is an exact copy of the previous temple, except that there is more gold leaf than before.
Kinkakuji's primary function is as a shariden, which is something like a reliquary -- inside are kept relics of the Buddha.