Emmanuel Agyemang-Badu scored the winning penalty for the Black Satellites, who previously lost in the final twice.
Goalie Daniel Aygei was the hero for Ghana, stopping a Brazilian onslaught after defender Daniel Addo was sent off in the first half.
In the shootout, Aygei stopped Alex Teixeira's penalty to set up the winning kick.
Hungary beat Costa Rica in a shootout for third place.
Total attendance for Egypt 2009 was 1,295,586, breaking the previous record of 1,195,239, set two years ago in Canada.