Marleny Olivo threw the fruit at the president while he was driving a bus through the central state of Aragua.
It had a message on it, in which she pleaded for his help.
Mr Maduro displayed the mango with her telephone number on it during a live television show afterwards. He said he had agreed to her request for a flat.
The move, he said, was part of the "Great Housing Mission of Venezuela".
Ms Olivo had written a message on a mango - "If you can, call me" - along with her name and phone number. She got as close to the bus as she could when it passed and then tossed the fruit at him.
In a video that has gone viral in Venezuela, the president can be seen lowering his head when he is hit just above the left ear. He then calmly picks up the mango and displays it to the crowd.
Later the president discussed the incident in one of his regular live TV broadcasts in which he displayed the infamous mango.
"She had a housing problem, right? And, Marleny, I have approved it already, as part of the Great Housing Mission of Venezuela, you will get an apartment and it will be given to you in the next few hours.
"Tomorrow, no later than the day after tomorrow, we will give it to you."
Ms Olivo said that there was "no evil intent" behind the incident only a desire to fulfil her dreaming of owning a home before she dies.
The president - who is a former bus driver and likes to connect with ordinary Venezuelans by touring local communities at the wheel of a coach - added that the fruit was ripe and that he would eat it later.
A Venezuelan woman has had her wish for a flat granted by President Nicolas Maduro after she made her point by hitting him on the head with a mango.