A police detective sergeant broke into a woman's house and raped her while she slept, a court has heard.
The victim sobbed as she recalled the night of the alleged attack to a jury at Derby Crown Court.
Gray, who is suspended from the Nottinghamshire Police force, today went on trial charged with rape, attempted rape and a third charge of sexual assault.
The woman told Derby Crown Court she had met Trevor Gray through mutual friends.
They had met up for drinks for a second time in Nottingham city centre.
Opening his case, Steven Coupland, prosecuting, told the court that the woman, a mother, did not think she had had enough to make her drunk.
But giving evidence, the victim said she couldn't remember leaving the final bar, Coco Lounge, or getting into the taxi, after three white wine and lemonades and a "strong" vodka and coke bought for her by Gray.
She said the next thing she remembered from the night was getting out of a taxi outside her house in Nottingham and being shocked to see Gray get out of it too.
"I was a bit shocked as that was not what I wanted.
"I never invite people back to my house even if I have known them for longer.
"That's just not something I would do, she told the court.
She said she invited Gray inside "through courtesy" before asking him to leave after 15 minutes because she was going to go to bed.
He left through the back door, saying he was going to get a taxi at the top of the road.
She sobbed as she told the court her next recollection was of him being naked in her bed on top of her and raping her.
"I'd heard the door bell being rung incessantly, lots and lots of times but I'd ignored it and went to sleep," she told the court.
The court heard he had called her five times, and texted her, saying "You are harsh".
She said she was woken up the morning after by her child shouting for her from the child's room, and was "horrified" to find Gray still in bed next to her.
"I went to get the children and went downstairs to the lounge. I felt like a prisoner," she told the court.
When he came downstairs a couple of hours later she asked him "Do you work for the police or are you a cat burglar". "I couldn't work out how he had got back into my house," she told the court.
When she went to let him out she noticed the security chain on the door was broken.
She told him: "That's how you got into my house, you broke into my house."
He replied: "I must have broken it when I leaned on the door. Don't worry I'll fix it."
The day after the attack, Gray was "as cool as a cucumber" when she called him to confront him, she said.
"Of all the time you've known me haven't I come across as a good person," he asked her, she said.
He then asked: "Has this put you off me?"
Gray, of Stanier Way, Nottingham, has since been suspended from his position pending the outcome of the investigation.
He denies all charges.
The trial, which is expected to last three days, continues.