This device is essentially a galvanic cell. The reference end is essentially the inner tube of the pH meter, which for obvious reasons cannot lose ions to the surrounding environment (as a reference is good only so long as it stays static through the duration of the measurement). The outer tube contains the medium, which is allowed to mix with the outside environment (and as a consequence this tube must be replenished with a solution of KCl due to ion loss and evaporation).
The measuring part of the pH meter, the glass bulb on the bottom, is coated both inside and out with a 10nm layer of a hydrated gel. These two layers are separated by a 0.1mm layer of dry glass. The silica glass structure (that is, the conformation of its atomic structure) is shaped in such a way that it allows Na+ ions some mobility. The metal cations (Na+) in the hydrated gel diffuse out of the glass and into solution while H+ from solution can diffuse into the hydrated gel. It is the hydrated gel, which makes the pH electrode an ion selective electrode.
H+ does not cross through the glass membrane of the pH electrode, it is the Na+ which crosses and allows for a change in free energy. When an ion diffuses from a region of activity to another region of activity, there is a free energy change and this is what the pH meter actually measures. The hydrated gel membrane is connected by Na+ transport and thus the concentration of H+ on the outside of the membrane is 'relayed' to the inside of the membrane by Na+.