Step 1: Understanding the Concept:
A diamagnetic substance has no atom, ion or molecule with an unpaired electron. All electron spins are paired, so it only shows a weak repulsion in a magnetic field.
A paramagnetic substance has atoms or ions with unpaired electrons. A ferromagnetic substance has strongly coupled magnetic domains.
Step 2: Key Approach:
For each option we write the electron arrangement of the particles that make up the substance and count the unpaired electrons.
Step 3: Check option (A) Gadolinium:
Gadolinium has seven unpaired 4f electrons plus one more in 5d. It is strongly magnetic: ferromagnetic below about 293 K and paramagnetic above it. So (A) is NOT diamagnetic.
Step 4: Check option (B) Sodium:
Sodium atom has the arrangement \(1s^2 2s^2 2p^6 3s^1\). The single 3s electron is unpaired, so sodium is paramagnetic. So (B) is wrong.
Step 5: Check option (C) Copper chloride:
In copper(II) chloride the ion \(Cu^{2+}\) has the arrangement \(3d^9\). One d electron is unpaired, so the salt is paramagnetic. So (C) is wrong.
Step 6: Check option (D) Sodium chloride:
In sodium chloride the ions are \(Na^{+}\) (\(1s^2 2s^2 2p^6\)) and \(Cl^{-}\) (\(1s^2 2s^2 2p^6 3s^2 3p^6\)). Both are closed-shell, with every electron paired. So sodium chloride is diamagnetic and (D) is correct.
Final Answer:
Only sodium chloride has all its electrons paired, so it is the diamagnetic substance. This is option (D).
\[ \boxed{\text{(D) Sodium chloride}} \]