When a charge \( q \) is accelerated through a potential difference \( V \), the energy gained by the charge is given by the relation:
\[
E = qV
\]
For an electron, the charge is:
\[
q = 1 \, \text{e} = 1.6 \times 10^{-19} \, \text{C}
\]
Given the potential difference:
\[
V = 5 \, \text{V}
\]
Substituting the values into the energy formula:
\[
E = 1e \times 5V = 5 \, \text{eV}
\]
So, the energy gained by the electron is \( 5 \) electron volts (eV), which is equivalent to the energy an electron acquires when accelerated through a potential difference of 5 volts.