Connecting nanoscale mechanical resonators to microwave quantum circuits opens new avenues for storing, processing, and transmitting quantum information. In this work, we couple a phononic crystal cavity to a tunable superconducting quantum circuit. By fabricating a one-dimensional periodic pattern in a thin film of lithium niobate and introducing a defect in this artificial lattice, we localize a 6 gigahertz acoustic resonance to a wavelength-scale volume of less than one cubic micron. The strong piezoelectricity of lithium niobate efficiently couples the localized vibrations to the electric field of a widely tunable high-impedance Josephson junction array resonator. We measure a direct phonon-photon coupling rate $g/2pi approx 1.6 , mathrm{MHz}$ and a mechanical quality factor $Q_mathrm{m} approx 3 times 10^4$ leading to a cooperativity $Csim 4$ when the two modes are tuned into resonance. Our work has direct application to engineering hybrid quantum systems for microwave-to-optical conversion as well as emerging architectures for quantum information processing.