There seems to be conflicting evidences about women who visit graveyards. Prophet Muhammad (PBUH) used to curse the women who used to follow the funeral possession and slap their faces and wail.
Aisha (RA) used to visit the graveyard and she also prayed the funeral prayer of her brother. In the beginning Prophet Muhammad (PBUH) did not want people to visit the graveyards in general.
However, afterwards Prophet Muhammad (PBUH) opened it up and said that visiting graves reminds us of death, soften the hearts and prioritizes the hereafter.
The prohibition before was for everybody and then when he gave the permission to visit the graves it was also for everyone.
Shaykh Omar Suleiman discusses in details.