The magnetic structure and fluctuations of tetragonal GdRhIn 5 were studied by resonant x-ray diffraction at the Gd L II and L III edges, followed by a renormalization group analysis for this and other related Gd-based compounds, namely Gd 2 IrIn 8 and GdIn 3 . These compounds are spin-only analogs of the isostructural Ce-based heavy-fermion superconductors. The ground state of GdRhIn 5 shows a commensurate antiferromagnetic spin structure with propagation vector τ = (0, antiferromagnetic (AFM) interactions. While a large J 1 /J 2 ratio favors an antiparallel alignment along the three directions (the so-called G-AFM structure), a smaller ratio favors the magnetic structure of GdRhIn 5 (C-AFM). In particular, it is inferred that the heavy-fermion superconductor CeRhIn 5 is in a frontier between these two ground states, which may explain its non-collinear spiral magnetic structure. The critical behavior of GdRhIn 5 close to the paramagnetic transition at T N = 39 K was also studied in detail. A typical second-order transition with the ordered magnetization critical parameter β = 0.35 was experimentally found, and theoretically investigated by means of a renormalization group analysis. Although the Gd 4f 7 electrons define a half-filled, spherically symmetrical shell, leading to a nearly isotropic spin system, it is argued that a significant spin anisotropy must be claimed to understand the second order of the paramagnetic transition of GdRhIn 5 and the related compound Gd 2 IrIn 8 .