The high temperature magnetic order in SrRu$_2$O$_6$ was studied by measuring magnetization and neutron powder diffraction with both polarized and unpolarized neutrons. SrRu$_2$O$_6$ crystallizes into the hexagonal lead antimonate (PbSb$_2$O$_6$, space group textit{P}$overline{3}$1textit{m}) structure with layers of edge-sharing RuO$_6$ octahedra separated by Sr$^{2+}$ ions. SrRu$_2$O$_6$ orders at $T_N$=565,K with Ru moments coupled antiferromagnetically both in-plane and out-of-plane. The magnetic moment is 1.30(2) $mu_mathrm{B}$/Ru at room temperature and is along the crystallographic textit{c}-axis in the G-type magnetic structure. We performed density functional calculations with constrained RPA to obtain the electronic structure and effective intra- and inter-orbital interaction parameters. The projected density of states show strong hybridization between Ru 4$d$ and O 2$p$. By downfolding to the target $t_{2g}$ bands we extracted the effective magnetic Hamiltonian. We performed Monte Carlo simulations to determine the transition temperature as a function of inter- and intra-plane couplings and find weak inter plane coupling, 3% of the intra-plane coupling, permits three dimensional magnetic order at $T_N$. As suggested by the magnetic susceptibility, two-dimensional correlations persist above $T_N$ due to the strong intra-plane coupling.