We present the gravity dual to a class of three-dimensional N=2 supersymmetric gauge theories on a biaxially squashed three-sphere, with a non-trivial background gauge field. This is described by a 1/2 BPS Euclidean solution of four-dimensional N=2 gauged supergravity, consisting of a Taub–NUT–AdS metric with a non-trivial instanton for the graviphoton field. The holographic free energy of this solution agrees precisely with the large N limit of the free energy obtained from the localized partition function of a class of Chern–Simons quiver gauge theories. We also discuss a different supersymmetric solution, whose boundary is a biaxially squashed Lens space S3/Z2 with a topologically non-trivial background gauge field. This metric is of Eguchi–Hanson–AdS type, although it is not Einstein, and has a single unit of gauge field flux through the S2 cycle.