Step 1: Start from the atomic number.
Gadolinium has $Z = 64$, so we need to place $64$ electrons. The nearest noble gas before it is xenon, with $54$ electrons, so we write $[Xe]$ and arrange the remaining $10$ electrons.
Step 2: Know the filling order for this region.
After xenon, electrons fill $6s$, then $4f$, with $5d$ close in energy. The $10$ extra electrons spread over $6s$, $4f$ and $5d$.
Step 3: Place the easy electrons first.
The $6s$ orbital takes $2$ electrons, giving $6s^2$. That leaves $8$ electrons for $4f$ and $5d$.
Step 4: Use the half-filled stability rule.
A half-filled $4f$ set ($4f^7$) is extra stable. So gadolinium prefers $4f^7$ instead of $4f^8$, and the leftover electron goes into $5d^1$.
Step 5: Add up to check.
$4f^7 + 5d^1 + 6s^2 = 7 + 1 + 2 = 10$ electrons, exactly what we needed beyond xenon.
Step 6: Write the configuration.
So gadolinium is $[Xe]\,4f^7\,5d^1\,6s^2$.
\[ \boxed{[Xe]\,4f^7\,5d^1\,6s^2} \]