Let $G$ be a group in question. First note that $G/Z(G)\cong C_{p^2}$ isn't possible. Thus $G$ has the presentation $$\langle Z,x,y\mid Z \text{ central}, x^p=a,y^p=b,[x,y]=c\rangle$$ where $Z$ is the center, $a,b, c \in Z$ and $c\neq 1,\; c^p=1$.
Added: Suppose $a=a_0^p,a_0 \in Z$. By replacing $x$ by $xa_0^{-1}$ we have the relation $x^p = 1$. Write $Z=\langle z_1,...,z_n\mid r(Z)\rangle$. Then we obtain the presentations $$\tag{I}G(c)=\langle z_1,...,z_n,x,y\mid r(Z), x^p=y^p=1,[x,y]=c\rangle$$
$$G(c,i)= \langle z_1,...,z_n,x,y\mid r(Z), x^p=z_i, y^p=1,[x,y]=c\rangle\tag{II}$$
$$G(c,i,j)=\langle z_1,...,z_n,x,y\mid r(Z), x^p=z_i,y^p=z_j,[x,y]=c\rangle\tag{III}$$
Clearly, $G(c,-) \cong G(c',-)$ if $\langle c\rangle = \langle c'\rangle$ and $G(c,i) \cong G(c,j)$ if $\exp(z_i)=\exp(z_j)$ and similar for $G(c,i,j)$.
Added 2: 1) In case (III) we can assume $i\neq j$ (otherwise, replacing $x$ by $xy^{-1}$ gives case (II)).
- Let $\exp(z_i)=k_i$. Denote by $(k_1,...,k_n)$ the isomorphism type of $C_{p^{k_1}} \times \cdots C_{p^{k_n}}$. Then the groups above have maximal abelian subgroups of the following types: $$\begin{array}{lcl} (I) & : & (k_1,...,k_n,1) \newline (II) & : & (k_1,...,k_n,1), (k_1,..,k_i+1,..,k_n) \newline (III) & : & (k_1,..,k_i+1,..,k_n), (k_1,..,k_j+1,..,k_n) \end{array}$$ Hence (I), (II), (III) belong to different ismorphism types.
It remains to check for which parameters $c,i,j$ the groups within (I) resp. (II) resp. (III) are isomorphic.
Added 3: Modulo possible mistakes a complete classification is given by:
Let $p$ be an odd prime, $Z=\langle z_1,...,z_n\rangle \cong C_{p^{l_1}}^{n_1} \times \cdots \times C_{p^{l_m}}^{n_m}$ with $l_1 > \cdots > l_m$ and suppose $$\lbrace 1,...,n\rbrace = \coprod_{i=1}^m \lbrace r_i,...,r_{i+1}-1\rbrace\qquad (n_i=r_{i+1}-r_i)$$ is a decomposition such that $\exp(z_j)=l_i$ for $r_i \le j < r_{i+1}$. Then the groups $G$ with $Z(G)=Z$ and $(G:Z(G))=p^2$ are given (up to isomorphism) by the following non-isomorphic presentations $(c_i := z_{r_i}^{p^{l_i-1}}):$ $$\begin{array}{llcl} G(c_i) & (i=1,...,m) & \qquad & \text{(I)} \newline G(c_i,r_j) & (i,j=1,...,m) & \qquad & \text{(II)} \newline G(c_i,r_j,r_j+1) & (i,j=1,...,m,\;n_j \ge 2) & \qquad & \text{(IIIa)} \newline G(c_i,r_j,r_k) & (i,j,k=1,...,m,\;j \neq k) & \qquad & \text{(IIIb)} \end{array}$$
In particular, there are $m^3 +m(1 + |\lbrace n_j \ge 2\rbrace|)$ isomorphism classes.
Proof: i) It follows from the structure of the max. abelian subgroups in Add-2, that $G(c,i) \cong G(c,j)$ iff $k_i=k_j$ and $G(c,i,j)\cong G(c,l,q),\;(i\le j,\;l \le q)$ iff $k_i = k_l$ and $k_j=k_q$.
ii) We determine the isomorphism types for various $c$.
Claim 1: $\quad G(c,-) \cong G(c',-)$ iff there is $f \in Aut(Z)$ such that $c'=f(c)$.
First, $f \in Aut(Z)$ extends to an isomorphism $\varphi_f: G(c,-) \to G(f(c),-)$ by $x \mapsto x, y\mapsto y$. Conversely, if $\varphi: G(c,-) \to G(c',-)$ is an isomorphism, then (easy calculation) there is $q$ coprime to $p$ with $c'=\varphi(c)^q$. Hence $c'=f(c)$ where $f\in Aut(Z)$ is the composition of $\varphi|Z$ and the $q$-power map. $\square$
Using $Z=\prod_{j=1}^m C_{p^{l_j}}^{n_j}$, we have the decomposition $\langle c\in Z \mid c^p=1\rangle = \coprod_{i=1}^m M_i$, where $$M_i = \lbrace (g_1,...,g_i,1,...,1)\mid g_i \neq 1,\;g_j \in C_{p^{l_j}}^{n_j},\; g_j^p=1\;(j=1,...,i)\;\rangle.$$
Claim 2: $\quad f(M_i)=M_i$ for $f \in Aut(Z)$. Conversely, for $c, c' \in M_i$ there is $f \in Aut(Z)$ such that $f(c)=c'$.
I omit the proof which is in essential based on linear algebra. Since $c_i = z_{r_i}^{p^{l_i-1}} \in M_i$, the claim implies $G(c,-)\cong G(c_i,-)$ for all $c \in M_i$ and $G(c_i,-) \not\cong G(c_j,-)$ for $i\neq j$. This completes the classification.
Remark: For $p=2$ (in contrast to $p$ odd) we have in addition the case $G(c,i,i)$ (i.e. $x^2=y^2=c\neq 1$). Example: Quaternion group of order 8. The reason is that $(xy^{-1})^p=c^{p(p+1)/2}$ is $1$ only if $p$ is odd.