We introduce a natural notion of mean (or average) distance in the context of compact metric graphs, and study its relation to geometric properties of the graph. We show that it exhibits a striking number of parallels to the reciprocal of the spectral gap of the graph Laplacian with standard vertex conditions: it is maximised among all graphs of fixed length by the path graph (interval), or by the loop in the restricted class of doubly connected graphs, and it is minimised among all graphs of fixed length and number of edges by the equilateral flower graph. We also establish bounds for the correctly scaled product of the spectral gap and the square of the mean distance which depend only on combinatorial, and not metric, features of the graph. This raises the open question whether this product admits absolute upper and lower bounds valid on all compact metric graphs.