With respect, incitatus is partially correct on this one. The expression originally derives from the 'four columns of virtue (or knowledge)' at King Solomon's Temple, built around 3,500 BC. It was customary to store treasures and scripts in architectural columns - if you broke a column to steal the contents, the roof would cave in! The first 3 columns are celebrated in Freemasonry and named after the architects & priests. The fourth column denotes the temple guardians (The Kinghts Templar). The 5th column was being constructed by apprentices, under the guidance of the Master Architect (Hiram a'bith). However the apprentices conspired to kill their Master and steal the hidden secrets. Their subversion was sucessful, but they were caught and executed. They became knwon through history as '5th Columnists' and this expression takes it's place amongst numerous other Masonic expressions brought into everyday language (such as 'giving someone the third degree' in honour of the exacting masonic ceremony of becoming a Master Mason).
As a Masonic historian and active Freemason I probably shouldn't give more information