Shopkeeper Ranvir Bassi, 35, who was in her family-run shop in Stafford, grabbed hold of the barrel and shoved it away and then chased the hooded robber as he fled empty handed.
The mum-of-two's courageous actions were caught on CCTV. Ranvi was shutting up the shop with her daughter Satpreet when the assailant burst in.
She said: "It was just horrific. He started shouting, 'Give me the money' and swearing at me.
"I really don't know why I did it, but I guess my mother's instinct took over, my daughter Sattreet was hiding and I just grabbed the gun.
"He had shouted at me to give him the money and I just shouted, 'Get out of my shop' - and started shoving him.
"I must have startled him because he turned and ran out of the shop. He just picked the wrong day to mess with me - I wasn't having him take my hard earned cash."
She said the incident had badly affected her daughter, who suffered from nightmares and flashbacks.
A 17-year-old boy, who cannot be named, was later caught by police after officers found his trainers close to the scene and the gun discarded by old bike frames nearby.
On Friday (June 13),the teenager admitted attempted robbery, possessing a firearm with intent to commit robbery and possessing a prohibited weapon.
Recorder Mr Michael Elsom told Stafford Crown Court: "Mrs Bassi displayed quite extraordinary bravery in taking hold of the weapon."
The case was adjourned and the teenager will be sentenced at a later date at the same court.