A 28-year old man was charged following the incident on Carlyle Crescent in the early hours of sunday morning and was remanded in custody following an appearance at Leeds Crown Court.
Police are appealing for witnesses who may have seen a woman in distress on Redhill Road between 3.30am and 4am.
It is believed she had been trying to summon help on the street after being the victim of the assault on nearby Carlyle Crescent.
The victim was treated in hospital after the assault and was later discharged.
Detective Sergeant Kristy Lindley of Wakefield District CID, said: “We are continuing to investigate this alleged serious offence at Carlyle Court in Castleford and are appealing for anyone who may have witnessed what took place or has any information to come forwards.
“While the assault took place on Carlyle Crescent we would like to speak with anyone who saw a woman in obvious distress knocking on doors on Redhill Road.
“Anyone who has information is asked to contact Wakefield CID on 101 referencing crime number 13190229203.
“Information can also be given anonymously to the independent Crimestoppers charity on 0800 555 111.”