Air pressure applies pressure between the blocks because the air is squeezed out of the joint.
Surface tension from oil and water vapor that is present between the blocks.
Molecular attraction occurs when two very flat surfaces are brought into contact. This force causes gauge blocks to adhere even without surface lubricants, and in a vacuum.
It is believed that the last two sources are the most significant.