Do the E and B modes of the CMB polarization have anything to do with electric and magnetic fields? As explained in this article, as the CMB is created from a vaiable (matter?) density $\kappa$ its gradient $\nabla \kappa = \vec{u}$ can be separated into a gradient and curl part, called the $E$ and $B$ modes

$$
\nabla^2 \kappa^E = \nabla \cdot \vec{u} 
$$

and 

$$
\nabla^2 \kappa^B = \nabla \times \vec{u}
$$

Thinking about electromagnetism, these definitions look slightly (but not exactly) familiar, if the vector $\vec{u}$ would take the role of the electromagnetic potential $\vec{A}$.

Is the similarity to the terminology of electromagnetism just a coincidence, or do these $E$ and $B$ modes have indeed something to do with electric and magnetic fields ?
In this context, the $\kappa$ you are referring to is called the dimensionless matter density field. It is gravitational lensing jargon, and is usually just referred to as the 'convergence' field. 

What you have written there (that a field can be split up into divergence-less and curl-less components) is generally speaking true for any field which can be expressed as the curl of another field $A$. @chris is correct in that they refer not to the electromagnetism you are probably used to hearing these types of things discussed in, but refer to the polarization states of the cosmic microwave background due to quantum fluctuations in the early universe. They are called 'E' and 'B' only because they are reminiscent of electric and magnetic field lines.

The big find was the measurement of B-modes. As a reminder, here is what these E- and B-mode patterns in the CMB would look like:


The big thing here is that E-modes are symmetric upon reflection, whereas B-modes are clearly not ($B&gt;0$ maps into $B&lt;0$). In order to produce B-mode polarization, you need two things:

1) Thompson scattering of photons by free electrons (present in the surface of last scattering as well as reionization). 

2) A temperature quadrupole.

The exciting thing about the second item is that there are only a few things which can produce just such a quadrupole moment, and one of them is gravity waves! Gravitational waves physically warp the coordinates of space-time as it travels through space, which of course have existing particles, causing these types of distortions:



This is the source of the temperature quadrupole moments. Sides which are squeezed are hotter and sides which are stretched are cooler.

Gravitational lensing can also produce small amounts of B-mode like features in the cmb polarization, but I believe they occur on much smaller scales and can therefore be ruled out as the cause of the BICEP2 findings. Lensing tends to stretch things out perpendicular to the radial vector (in the $\hat{\theta}$ direction):


The reason why this matters is because lensing provides a mechanism for turning E-mode polarization (take the $E&lt;0$ mode for example) into a B-mode type polarization. Most plots of the BICEP2 results show the effect of lensing at much higher multipole moment (i.e. - smaller physical scales), so I believe they have a good way of differentiating between the two types of secondary cmb anisotropies.