We derive the density functional for the ground-state energy of a two-dimensional, spin-polarized gas of neutral fermionic atoms with magnetic-dipole interaction, in the Thomas-Fermi-Dirac approximation. For many atoms in a harmonic trap, we give analytical solutions for the single-particle spatial density and the ground-state energy, in dependence on the interaction strength, and we discuss the weak-interaction limit that is relevant for experiments. We then lift the restriction of full spin polarization and account for a time-independent inhomogeneous external magnetic field. The field strength necessary to ensure full spin polarization is derived.