Marwan Tarek, 17, said "dreams do come true" after beating France's Victor Crouin, winning 3- 2: 11-9, 3-11, 11-6, 3-11, 11-3.
It was the first time since 2013 that an Egyptian has won the men's junior title while El Araby's success is the seventh successive title for an Egyptian woman.
She said it was tough to play another Egyptian.
"We are friends off the court, so it is hard," El Araby said after the match.
"But there are no friends on the court."
In the first game of the final, El Araby put the first three points on the board before conceding a point to her opponent at the end of a long, fiercely fought rally.
She took the game to match point 10-3, and El Hammamy fought back, scoring four times for 10-7.
El Araby ended the game with an unreturnable nick shot across the court, bouncing the ball into the angle where the wall met the floor and killing its momentum.
New Zealand world junior girls' team coach Jo Williams said the shot looked entirely deliberate and was typical of the "flamboyant" style of play the Egyptian players were known for.
As El Araby played her final shot to win the game 11-8, and the match 3-0, she let out a short yell in celebration.
Her win was a long time coming. Her father, Reda Araby, said she had reached the final of a major tournament three times before - including last year's worlds in Poland - and lost each time.
Today, he sent up a little prayer that she would finally get her win, and it was answered.
"I am very, very proud of her. Not for the final - for the work," Mr Araby said of his daughter, who juggled school and a punishing training schedule to prepare for the tournament.
"Always, she is not at home. Practising, practising, practising, always."
Mr Araby's pride was evident as he hugged his daughter and lifted her up as she left the court, a world champion at last.
Grinning from ear to ear after the match, El Araby said she was feeling "super happy".
"I have been working so hard to get this title. I did my best and I tried hard to be here."
She and her father both said they were enjoying visiting "beautiful" New Zealand.
As the number one seed, El Hammamy came into the tournament as the one to beat.
Former squash world champion Dame Susan Devoy told the finals crowd that it was a tough position to be in.
"I feel sorry for Hania."
- Additional reporting, Jim Kayes
NZ vs Egypt to kick off teams tournament
Tomorrow the women's teams tournament gets underway, with 14 countries contesting the crown.
Coach Jo Williams said New Zealand was in group A with Egypt and Australia, with their first game against Egypt tomorrow at 6pm.
She said Egypt's team, which included both individual finalists, would be a tough beat.
"The girls are really looking forward to it."
The Kiwi team will be made up of Rotorua's Camden Te Kani- Mcqueen alongside Kaitlyn Watts, Anna Hughes and Anika Jackson.
Williams said the girls had been improving with every game, and each had been able to get at least one rest day in before the teams tournament began.
Their goal was to beat Australia.
"We at least need to come second, then we can make the top 8. But we're just taking it one match at a time."
Men's and women's team junior world championships alternate year to year, so there will be no men's team play at this tournament.