  We report the structural and magnetic ground state properties of the
monoclinic compound barium iridium oxide Ba$_4$Ir$_3$O$_{10}$ using a
combination of resonant x-ray scattering, magnetometry, and thermodynamic
techniques. Magnetic susceptibility exhibits a pronounced antiferromagnetic
transition at $T_{\text{N}}$ $\approx$ 25K, a weaker anomaly at $T_{\text{S}}$
$\approx$ 142K, and strong magnetic anisotropy at all temperatures. Resonant
elastic x-ray scattering experiments reveal a second order structural phase
transition at $T_{\text{S}}$ and a magnetic transition at $T_{\text{N}}$. Both
structural and magnetic superlattice peaks are observed at $L$ = half integer
values. The magnetization anomaly at $T_{\text{S}}$ implies the presence of
magneto-elastic coupling, which conceivably facilitates the symmetry lowering.
Mean field critical scattering is observed above $T_{\text{S}}$. The magnetic
structure of the antiferromagnetic ground state is discussed based on the
measured magnetic superlattice peak intensity. Our study not only presents
essential information for understanding the intertwined structural and magnetic
properties in Ba$_4$Ir$_3$O$_{10}$, but also highlights the necessary
ingredients for exploring novel ground states with octahedra trimers.
