The lowest dimensional gluon condensate $G_2$ is analyzed at finite temperature and chemical potential using a holographic model of QCD with conformal invariance broken by a background dilaton. Starting from the free energy of the model, the thermodynamical quantities needed to determine the $T$ and $mu$ dependence of the gluon condensate are evaluated. At high temperature the gluon condensate is independent of chemical potential. Moreover, at $mu=0$ and in the string frame, the temporal and spatial Wilson loops at low temperature are computed; they are related to the (chromo) electric and magnetic components of $G_2$, respectively. The $T$-dependence of the two components is separately determined.