Darren Burke, who works in the Home Office, is accused of handing Laura Slade orange juice containing a drug which is used to induce abortions.
Ms Slade refused the drink but suffered an unconnected miscarriage weeks later.
Mr Burke, 43, from Windsor, denies both intentionally obtaining the drug with intent and attempting to administer it to procure a miscarriage.
Isleworth Crown Court, in west London, was told how in 2020 Mr Burke encouraged mother-of-two Ms Slade to terminate her pregnancy, sending her links to an abortion clinic as well as an abortion pill.
Ms Slade, who gave evidence from behind a screen, said she had not wanted an abortion, telling the court: "I told him when the due date was and that I was keeping my child."
She said she later had "an instant gut feeling something was not right" when on 3 December 2020, Mr Burke offered to get her Starbucks the following morning - something Ms Slade claimed he had not done before.
Describing what happened when he arrived at her Chiswick flat on 4 December, she said: "He was very flustered, walking between the front room and the kitchen and was offering me a drink again."
She also claimed he said that he did not want to be on the baby's birth certificate, and she had then had asked him to leave.
The court was told Mr Burke then brought in two glasses with water in one and what looked like orange juice in the other, and asked if she was going to drink it.
Ms Slade told the court she swore at him and said no.
"He then picked it up and took it into the kitchen with his cup, then came back," she said.
"I waited for the door to close, ran to the door, locked the door, then ran to the sink."
Ms Slade said she had found a white powder on the empty glass and called police the following day.
Mr Burke is accused of lacing the drink with mifepristone.
David Spens QC, defending, suggested Burke was not "insisting" that Ms Slade drink the orange juice but had simply asked her twice because he was being "caring".
The trial continues.