The first (known) female Pharaoh is Sobekneferu (or Neferusobek) that ruled Egypt three centuries before Hatshepsut, from 1806 to 1802 BC. Sobekneferu is probably the earlier female ruler (in general, not only Egypt's) whose name we know and for whose reign we can be reasonably certain.
James Henry Breasted regarded Hatshepsut as "the first great woman in history of whom we are informed.", and I think you read that with emphasis on "first" when you should have read it with emphasis on "great" and "informed". Hatshepsut had a very long and (mostly) peacefull reign, and is commonly quoted as one of the most succesfull Pharaohs.
Another candidate for the earlier female ruler is Nitocris, a female Pharaoh mentioned by Herodotus:
[Hdt. 2.100.1] After him came three hundred and thirty kings, whose names the priests recited from a papyrus roll. In all these many generations there were eighteen Ethiopian kings, and one queen, native to the country; the rest were all Egyptian men.
[Hdt. 2.100.2] The name of the queen was the same as that of the Babylonian princess, Nitocris. She, to avenge her brother (he was king of Egypt and was slain by his subjects, who then gave Nitocris the sovereignty) put many of the Egyptians to death by treachery.
[Hdt. 2.100.3] She built a spacious underground chamber; then, with the pretence of inaugurating it, but with quite another intent in her mind, she gave a great feast, inviting to it those Egyptians whom she knew to have had the most complicity in her brother's murder; and while they feasted, she let the river in upon them by a vast secret channel
[Hdt. 2.100.4] This was all that the priests told of her, except that when she had done this she cast herself into a chamber full of hot ashes, to escape vengeance.
Nitocris is traditionally placed at the end of the Sixth Dynasty, with her rule being from 2184 – 2181 BC, however her historicity is strongly disputed as she isn't mentioned anywhere else.
Lastly, a much earlier candidate is Merneith (Meritnit, Meryet-Nit or Meryt-Neith), a 30th century BC (possible) ruler of Egypt, for who very little is known.