Pharaoh is the word for an Ancient Egyptian ruler regardless of gender. Men and women still had designations as kings and queens, but the title of Pharaoh specifically referred to the acting ruler.
Hatshepsut is typically considered the first woman to rule as pharaoh, though some evidence suggests three other women had short reigns before her. The last female to rule as pharaoh was Cleopatra, who died in 30 B.C. after a 21 year reign. Ancient Egyptian law treated women differently than most societies of the time. Woman of the time could own property and be appointed to official positions.