Gadolinium is element 64: period 6, lanthanoid of the f block. Its ground-state configuration is 1s² 2s² 2p⁶ 3s² 3p⁶ 3d¹⁰ 4s² 4p⁶ 4d¹⁰ 4f⁷ 5s² 5p⁶ 5d¹ 6s², so its outermost occupied shell is n = 6 and holds 2 electrons.
Madelung order predicts 1s² 2s² 2p⁶ 3s² 3p⁶ 3d¹⁰ 4s² 4p⁶ 4d¹⁰ 4f⁸ 5s² 5p⁶ 6s²; the atom fills 1s² 2s² 2p⁶ 3s² 3p⁶ 3d¹⁰ 4s² 4p⁶ 4d¹⁰ 4f⁷ 5s² 5p⁶ 5d¹ 6s² instead. The filling rule is an approximation, and gadolinium is one of the twenty elements where the atom disagrees with it.
Each orbital below is the hydrogen-like solution at the effective nuclear charge Slater's rules give its subshell, so its radial nodes and its angular nodes fall where the wavefunction changes sign rather than where a drawing puts them.
Atomic orbitals, hybridisation and molecular orbitals, computed and drawn in your browser. The tool needs JavaScript and WebGL2; these are the pages it offers: