We report a comprehensive investigation of the structural, magnetic, and electrical properties in a quasi-two-dimensional planar antiferromagnet ${\mathrm{BaNi}}_{2}{({\mathrm{PO}}_{4})}_{2}$, which crystallizes in the rhombohedral structure (space group $R\overline{3}$) consisting of honeycomb layers of ${\mathrm{Ni}}^{2+}$ ions. Magnetic susceptibility and heat capacity data reveal a long-range antiferromagnetic ordering of ${\mathrm{Ni}}^{2+}$ ions at ${T}_{N}=24$ K. Interestingly, an applied magnetic field induces a dielectric anomaly and an electric polarization at ${T}_{N}$ with the polarization proportional to the applied magnetic fields, demonstrating the linear magnetoelectric effect in ${\mathrm{BaNi}}_{2}{({\mathrm{PO}}_{4})}_{2}$ with a coupling coefficient of 1.67 ps/m. It is interesting to note that the magnetic symmetry associated with the magnetoelectric effect is ${\overline{1}}^{\ensuremath{'}}$, which allows all tensor elements of the magnetoelectric susceptibility.