Southwark Crown Court heard she was raped by Sgt Edwin Mee at the Mitcham Barracks Army Careers and Information Office in Croydon.
She said when she told him about the pregnancy he said: "Oh, I did not think you would get pregnant." She later miscarried.
Mr Mee, 45, of Tavistock Road, Croydon, denies a string of sex assaults.
Mr Mee is charged with 17 counts of sexual assault, three rapes and one count of assault by penetration against 11 victims between 2010 and 2011.
The woman, aged 27, broke down as she told the jury how she was raped, later miscarried and felt she had no-one to turn to about her ordeal.
Speaking from behind a curtain, she said Mr Mee made her feel "uncomfortable" during the recruitment process but she felt she had to attend his appointments because she wanted a job in the Army.
She only later became able to say what had happened once an investigation was launched and she later got married, the jury heard.
Her husband found out about the alleged rape through a family friend and "told me not to be scared, he gave me the courage to come here today," she said.
On the night of the alleged rape, she was nervous after Mr Mee had organised an evening appointment and told her he "liked her".
She told the jury: "He said 'there is no other way out. The front door is locked. There is no camera in here and this door is closed - so you have to choose. You have to give me sex. If you do not want to do it then you cannot leave. You have to choose and then you cannot say anything to anyone."
The woman said she did not feel as if she could escape: "Everywhere was closed... I tried and tried to get to the main door but he said 'that door is already locked'."
After the alleged assault, she said, he took her out the back door and dropped her off in his car so she could catch the bus home.
The trial continues.
A woman has told a court she became pregnant after an Army recruitment sergeant raped her in a locked room.