We propose a comprehensive public program targetting the electromagnetic counterpart to a gravitational wave source. The counterpart - a kilonova - is created by rapid neutron capture (the r-process) in the neutron-rich ejecta from the merger of two neutron stars, or a neutron star and a black hole. The one kilonova studied in detail to date confirms predictions that they are faint, red and fast-evolving. The unique combination of depth and wavelength coverage from JWST will enable the next pivotal breakthroughs in their study. We will map the bolometric luminosity to determine the quantity of heavy elements produced. Their synthesis sites will be isolated by mapping the relative strengths of blue emission (from lighter elements) and red emission (from heavy elements). Late time photometry can detect the presence of any long-lived radioisotopes from the heaviest elements. Our spectroscopic observations will go further, enabling us to decompose the various kilonova components, and search for individual elements either in the early or late phases of the KN. Finally, the deep observations will provide a unique route to determining the distance to the host galaxy, enhancing the accuracy of the gravitational wave derived Hubble constant, and will provide a high-resolution view of the merger environments. Together these observations will create significant new knowledge about the origin of the heaviest elements known in nature, including those of great value (e.g. gold) and some which are vital to life on Earth (e.g. iodine, thorium). To enhance community value, we propose a public programme and will make reduced products available shortly after the observations....