Firstly it is incorrect to state that the Israeli army was outnumbered. As stated by Avi Schlaim in "The Iron Wall: Israel and the Arab World", at the start of the conflict in May 1948, the IDF had 35,000 troops at its disposal, while the Arab forces in Palestine totalled 25,000. By mid-July the IDF had 65,000 troops and by December it was 96,441. While the Arab army also increased in size during the war, it couldn't match the IDF's numbers and by the end of the war the Israeli forces were almost double the size of the Arab armies.
Much of the IDF arose from the pre-Israel Jewish defence force called the Hagana. This was founded in 1920 as a militia to protect Jews in Palestine from Arab attacks, which had increased after the political collapse of the Ottoman empire, as well as increasing resentment towards Jewish immigrants and Zionists from the Arab population. In the 1930s it became considerably more organised and disciplined, with its members, including future prime minister Shimon Peres, doing nearly daily training. It also gained experienced as conflicts with the Arabs became more frequent. A large number of Palestinian Jews also fought in the Second World War under British command. By the end of the war over 26,000 Palestinian Jews were part of the British army, including an elite desert warfare unit of 1400 soldiers called the Palmach which eventually became the commando unit of the Hagana. So by the time of the 1948/49 conflict, the IDF contained many soldiers who were highly trained and had experienced real conflict. It was not an army of beginners by any stretch of the imagination. It is true that at the start of the war the IDF was less well equipped than the Arab armies at the start of the war, but in the first truce, which happened between June 12th and July 9th, Czechoslovakia supplied arms to the IDF which Schlaim says 'decisively tipped the scales in their favour'. So the war was basically won by the most powerful side, which was Israel.
Much of the war has become almost mythologised; the Israeli leadership at the time was reasonably confident of its ability to withstand the Arab assault, but was aware of how powerful a 'David vs Goliath' portrayal of the conflict could be and promoted it. Much of this has remained, as we see in the question. That is not to say that the war was easy for Israel. It is undeniably true that the conflict pitted one small country of 650,000 people against Iraq, Egypt, Jordan, Lebanon, Syria and Palestine. Egypt, for comparison, had around 20 million people in 1948, while Iraq had around 6 million. 6500 Israelis died in the war, 1% of the population, which is not an insubstantial figure.
Israeli strategy was one of the key reasons for success, and one extremely easy part of the strategy was to exploit the extreme fractures within the Arab world. While the Arab League was unified in its commitment to war and to defend the Palestinians, each nation that joined the war had its own motives and limited military commitments. First, just by looking at the populations it is clear that the Arab armies were drastically undersized. Secondly, the political aims of the arab nations were often directly at odds with each other. The Hashemite rulers of Jordan had an expansionist view and wanted Palestine as part of their kingdom, before also incorporating Syria. Syria, aware of this, was more fearful of Jordan than of Israel. Egypt was greatly opposed to Jordanian expansion and would not allow it, and nor would Saudi Arabia, who had gained independence through war against the Hashemites.
These rifts had a direct impact on the war, with the Arab nations often watching each other as much as the Israelis. Moreover, Jordan maintained a close relationship with the Israeli leadership throughout the war, and at no point made any attempts to capture Israeli land, despite Israel capturing land allocated to the Palestinians in the UN partition plan. Jordan, which was in charge of the Arab League army, did not intervene when Israeli and Egyptian troops faced off in the Negev, staying neutral despite supposedly being on the same side as the Egyptians. This is just one way in which Israel was able to exploit the politics in the Arab world to its gain.
The Arab failure in the war was remarkable, and had dramatic consequences in the Arab world. Most significant was the rise of Nasir, who was a soldier in the war. His experiences there highlighted the failures of Egyptian society and drove him to his branch of pan-Arabism. Somewhat ironically it was similar rifts in the Arab world that enabled an even more decisive Israeli victory in 1967.
There's always more to be said, but as we wait for an answer: this question has been previously asked here, where /u/smileyman and /u/nonnonnonheinous give two answers, and partly here.