We have undertaken the most detailed investigation yet of the shape and variability of the radio spectrum near the spectral peak of a gigahertz-peaked spectrum radio galaxy, using the Australia Telescope Compact Array. The radio spectrum of PKS 1718-649 was measured nearly simultaneously at 30-40 different frequencies over the range of 1-9 GHz at four epochs over a 14 month period, with the aim of constraining different physical models for the absorption process that causes the spectral peak at gigahertz frequencies. We find that the two most plausible absorption processes, synchrotron self-absorption and free-free absorption, can each explain most aspects of the data. However, each process also has difficulty explaining some aspects of the data, in particular the variability of the source at frequencies below the peak. In either case, models based on homogeneous absorbers are clearly inadequate and inhomogeneities must be introduced into either the synchrotron self-absorbed source or the free-free absorbing screen. Based on our analysis we cannot strongly prefer either synchrotron self-absorption or free-free absorption as the sole process responsible for the gigahertz-peaked spectrum of PKS 1718-649. However, the consistency of the measured source size, from VLBI observations, with the observed turnover frequency favors synchrotron self-absorption as a significant effect in PKS 1718-649.