in 1977 NATO agreed to adopt a 2nd round in addition to the 7.62x51mm round, specifically the SS109 steel tipped round which was designed to pierce a soviet style steel helmet at 600 meters.
Jane's Infantry Weapons 1986–1987, pg. 362
The Small Arms Review vol.10, no.2 November 2006.
It's 4am and I haven't looked into the details of the agreement but I'm assuming it's related to the US introducing the M16 and 5.56mm round in 1960.
There's two questions here. One, why was an intermediate rifle round* chosen? Two, to get to your question why was 5.56x45mm specifically chosen?
*"intermediate" rifle rounds are rifle cartridges which are smaller than full-sized rifle rounds. For example, the Russian 7.62x54mmR, which has a 7.62mm bullet and a 54mm long shell (the brass part of a cartidge that contains the primer and propellant). By contrast the Russian 7.62x39mm round fire by the AK-47 fires a shorter, lighter 7.62mm diameter bullet from a shorter 39mm shell. The 5.56x45mm is thus an intermediate round, whereas the 7.62x51mm NATO round is a full-sized rifle round.
To answer the first question, the end of WWII and the immediate aftermath saw a doctrinal shift amongst many world militaries. Observers realized that many infantry engagements were happening at realtively close ranges (25-400m). At those ranges, rifles firing full-sized rounds had several disadvantages. The heavy recoil of the larger rounds made quick follow-up shots difficult and allowed enemy soldiers armed with submachine guns (the Soviets frequently equipped entire battalions with SMGs for close assault work) to outshoot soldiers with bolt-action and semi-auto battle rifles. The heavy and bulky ammunition limited the amount of ammunition soldiers could carry. And the pistol cartridges fired by submachine guns simply didn't have the reach or stopping power needed to be an effectively replacement for full-sized rifles. So a compromise had to be reached.
Arms designers came up with a simple solution to these problems: the intermediate round. This idea actually predates WWII, and several firearms inventors had proposed mid-sized rifle cartridges. The best-known example is the .276 Pedersen round, which would have been fired out of the M1 Garand (Douglas MacArthur intervened and had the M1 chambered in .30-06 instead).
However, intermediate cartridge development really accelerated toward the end of WWII and the beginning of the Cold War. In 1943 and 1944, Germany developed the StG43/MP44, which fired an intermediate round: the 7.92×33mm Kurz. In 1945, the British began work on the .280/7mm round, which they planned to fire from the EM-2 bullpup rifle. And of course the Russians had the SKS (and later the AK-47) in 7.62×39mm.
Now, to answer the second part of your question: why was the 5.56mm round chosen? Why not .280 British or one of the other contenders? Well, part of it came down to the fact it was an American design. As the largest nation in NATO, the largest arms buyer/producer, and the founder of the alliance, the US had enormous clout over NATO standardization decisions. Once the Americans decided that they wanted to go with the AR-15/M-16 combination, any NATO member that wanted an intermediate round (and still wanted to be able to buy/borrow ammo from US warstocks in the event of an emergency) more or less had to go with 5.56mmx45.