The 28-year-old's nine-year-old daughter was also threatened by a member of the gang, who had a knife.
The burglary happened at their home in the Turf Hill area at about 05:30 BST on Wednesday, Greater Manchester Police said.
The three balaclava-wearing men stole cash, jewellery and a mobile phone before fleeing.
The offender carrying the gun, said to be a small silver metal handgun, was described as Asian, slim and aged between 20 and 30.
The man with the knife was black, between 30 and 40, of a medium build and with bloodshot eyes.
It is believed they were met by three other men outside the property.
Police are now appealing for anyone with information to contact them.
Det Con Rich Shelton said: "This gang targeted a mum and her young daughter, even stooping as low as to hold a gun to the head of a woman who was clearly heavily pregnant and absolutely terrified.
"Thankfully they were not physically injured and the unborn baby not harmed but the emotional trauma they have suffered is immeasurable."
A heavily pregnant woman had a gun pressed to her head when masked burglars broke into her Rochdale home.