This is a great question. I’d love to take a crack at it. The first thing that I want to point out is that Israel wasn’t under attack during the Six Day War. Instead, the Six Day War was launched as a preemptive attack by the Israelis. First against the Egyptians, then the Jordanians, and finally, after the southern fronts were victorious, the Syrians. I’m not sure where you’re getting the notion that 5 countries were involved. I’m writing this mostly from memory; I believe there might have been a contingent of Iraqi troops in the West Bank when war broke out, but it wouldn’t have been sizable and it wouldn’t have had any sizable impact in the fighting.
Let’s get back to the notion of a preemptive attack. In 1967 the Israeli state was 19 years old. It had already fought two full pitched conflicts against its neighbors and since 1956 had suffered a sustained series of guerilla/terrorist/insurgency attacks (the definition of which would likely depend on your political predilections) from displaced Palestinians operating from Jordan. In the years leading up to the Six Day War the leader of Egypt, Gamal Adbel Nasser, was a renowned proponent of Pan-Arabism. That’s really a separate topic, but the crux of it is that the Arab peoples should be united (under his leadership) against colonialism and for the promotion of Arab socialism. The effect this had directly to the advent of the Six Day War was that Israel felt itself to be completely surrounded by enemies that were increasingly united.
The Six Day War started on June 5th, 1967. The six months preceding the war saw increasing cooperation between Egypt, Syria, and Jordan, with a variety of mutual defense pacts, cooperation treaties, and high-level meetings. This started to set off warning signs in Israel. Additionally, the Egyptians had decided to remove the UN peacekeepers in the Sinai peninsula, the border area between Egypt and Israel, as well as attempting to blockade the Straits of Tiran. The straits are adjacent to the Red Sea and was the only waterway for Israel to access the Red Sea and Indian Ocean. A persistently hostile situation, exacerbated, by Palestinian border attacks, military cooperation with its enemies, direct action against Israeli shipping, and removing the UN peacekeepers lead the Israeli government to the decision that war was imminent and that to succeed they needed to strike first.
On the morning of June 5th, the entire Israeli air force launched hundreds of sorties against the Egyptian air force. This was an extraordinary military maneuver. I’m trying to think of a similar instance in modern military history and I can’t (although there probably is). The Israelis risked total destruction of their air force and were rewarded with the total destruction of Egypt’s air force. Soon thereafter, the Israeli tanks and armored forces started to cross the border. If you look at a map you’ll see just how large the Sinai is. Israeli forces reached the Sinai canal, took the peninsula, and completely incapacitated the Egyptian military in the Sinai in three days. The Egyptians were caught completely flat-footed, underprepared, poorly trained, and with no air support. Oh! I totally forgot that the bulk of the Egyptian fighting force was already deployed in Yemen fighting in the civil war there. That should have mentioned earlier and certainly was one of the most influential reasons why Israel was so successful so quickly.
Turning towards Jordan and the West Bank. Israel launched attacks against Jerusalem (or rather, the Old City) and Jenin in the north of the West Bank later in the afternoon of the 5th. Fighting was fierce around Jerusalem, and Israelis tanks were met with stiff resistance in the north. Still, the Jordanians hadn’t the men or the equipment to hold back the Israeli armor or the forces surrounding Jerusalem. On June 7th, Israeli paratroopers entered the Temple Mount, captured all of Jerusalem, and King Hussein ordered a withdrawal of all Jordanian forces from the West Bank. The Jordanians were probably the least eager to fight the Israelis. The West Bank had only been part of Jordan’s kingdom since 1948 and the annexation had created a huge population imbalance in favor of the Palestinians instead of the traditional tribal networks in Jordan. The King wasn’t ready to sacrifice is throne, his country, and his army to defend the West Bank.
Finally, we turn to Syria. The Syria attack began after the situations in Egypt and Jordan were already secured. According to my recollection of Michael Oren’s “Six Days of War”, the military commander of the northern front was frustrated that his forces had been contained thus far in the war and was urging command to let loose his forces to hopefully launch a knockout blow to the Syrians. When he was given permission to attack, he almost did. At this point military resistence in the other two fronts had collapsed and the Israelis hit the Syrians hard. The Golan Heights were overrun, Mount Hermon was overrun, and Israeli tanks were massed on the Plains of Damascus before a ceasefire was called. It was a complete military victory.
Eight years ago the Economist published a report about the 40 year anniversary of the Six Day War. I’m trying to right this paragraph and abide by the 20 year rule, which is difficult, so please bear with me. Basically, the premise is that even though the Israelis won a complete victory on the battlefield, the long term political costs have been incalculable. Occupying Gaza and the West Bank has brought decades of perpetual violence, sometimes low-level, sometimes horrific. The same combatants even fought another war in 1973, partly to avenge the defeat in 1967.
Source: Several history courses in college and Michael Oren’s “Six Days of War”