Reg Traviss (35) attacked the woman after she was so drunk she could not stand, it was claimed.
The film director, who was Winehouse's boyfriend when she died at her home in Camden, north London, in July last year, faces two counts of rape at Southwark Crown Court. He denies the charges.
Traviss and the woman, a friend, had been drinking at three bars in the capital on December 30 last year before going to his home on Marylebone High Street.
There she alleges she twice fell asleep to wake up with him raping her.
Kate Lumsdon, prosecuting, said the complainant remembered Traviss asking if she wanted to stay at his and she assumed she had said yes.
She said: "His asking that question was the last thing she remembers that evening until being woken in his bed because of a sharp pain.
"She realised he had penetrated her...she asked what he was doing and told him to stop.
"He stopped. She was very shocked. They chatted for about half an hour and she relaxed again. She could not process what had happened and could hardly believe it."
Ms Lumsdon said the complainant felt extremely weak and suffered from a blood sugar level condition.
She said the accused asked if she wanted to go back to sleep, which she did, but woke up to find him raping her again.
"She said she felt so tired and so weak that she passed out.
"She remembers him saying 'Oh, I always wanted to do this to you'."
Before leaving the property the next day, the complainant could not find her underwear.
Ms Lumsdon said Traviss told the victim: "I actually want to keep them."
The jury heard that the complainant went out with friends the following night, New Year's Eve, went away to New York in the new year and waited almost three weeks before reporting Traviss to police.
The trial continues.