It looks like an electric arc to me, more precisely, a single-phase arc -- it seems like AC current was applied, as "ground" and "neutral" ends were used. Hence the light emission, high observed current density, and high temperature. As you noticed, the yellow color is most likely due to the presence of $\ce{Na+}$ ions.
Any conducting (or not so, if the voltage is high enough) object put in contact with a couple of separated electrodes and applied current (DC, single-/three-phase AC) can undergo arc discharge. For example, with the current from the standard household outlet one can do the same with lemons (it's going to smell better though than the gherkin, at least at the beginning due to evaporating essential oils); one can also light a tip of a cigarette moistened with saliva; or put a piece of paper with a pencil drawing on fire within seconds (starting the ignition from the graphite layer) and so on. Even a piece of wood can also glow when arc discharge paves the way in a form of graphite path after dielectric breakdown in between electrodes of HV-generator ($\pu{5 .. 10 kV}$ depending on wood and moisture).
It is not the particular end of the gherkin that glows, it is an area where arc discharge takes place. One can also observe arc(s) hopping along between two elongated parallel electrodes in the very same gherkin:
Video courtesy of YouTube channel "ПРОСТАЯ НАУКА" (Russian; English "SIMPLE SCIENCE")
Predicting the path of the arc is a rather non-trivial physics problem. To put it simply, it partially depends on the contact area, which constantly changes mainly due to vigorous boiling substance, as well as the local pressure and composition of formed gases, which results in equilibrium or non-equilibrium plasma formation in positive column (luminous region in the environment between the electrodes).
The process of forming an electric arc can be simplified down to three distinguished stages:
Arc ignition, when, as a result of shock ionization and emission of electrons from the cathode, an arc discharge begins and the ionization intensity is higher than deionization. As the electrodes are diverged from each other, the contact pressure and the contact surface are decreased due to increased transient resistance in addition to the resistance of the media (mostly vinegar/salt solution in this case), overheating starts. High temperature subsequently contributes to thermionic emission, when the electron velocity increases so they can be eliminated from the electrode surface. The voltage on the contact gap is quickly restored, and since the distance between the contacts is small, an electric field of high intensity arises, under the influence of which more electrons get accelerated and escaped from the electrode surface. When they struck a neutral atom or molecule, they give away their kinetic energy. If this energy is sufficient to remove at least one electron from the shell of a neutral atom, then the ionization process takes place.
Stable arc combustion maintained by thermal ionization in the arc itself, when the ionization and deionization intensities are approximately equal. Free electrons and ions form plasma arc content, that can be represented as an ionized channel, in which the burning act takes place and continuous motion of the particles is ensured. Negatively charged particles (primarily electrons) move toward the anode, and positively charged particles (deprived of one or several electrons atoms and molecules of gases) in the opposite direction (toward the cathode). This contineous flow makes the conductivity of plasma comparable with the conductivity of metals. So the voltage drop along the length of the arc is small due to the intensive thermal ionization.
Arc extinction, when the deionization intensity is higher than the ionization. In addition to ionization, there is also deionization of atoms and molecules. The latter occurs mainly through diffusion of charged particles to the environment, and the recombination of electrons and positively charged ions, which are reunited into neutral particles releasing energy in a form of heat.
Video bloggers all over the internet popularized the heck out of this effect, which is, strictly speaking, has more to do with physics, rather than with chemistry.