Veronica J. Rutledge, 29, of Blackfoot, Idaho, had a permit to carry a concealed weapon.
She had that gun with her when she took her son and three other children shopping at Wal-Mart in Hayden.
They were in the town about 40 miles northeast of Spokane, Wash., to visit family.
Emilie Ritter Saunders of Boise State Public Radio tells NPR's Newscast Unit: The Kootenai County sheriff's office says the 2-year-old boy, who was seated in a shopping cart, reached into his mother's handbag, found the loaded gun and shot her.
By the time law enforcement reached the store, Rutledge was dead.
Sheriff spokesman Stu Miller says the incident was captured on surveillance video.
"It's a tragedy. Accidental. Probably could have been prevented through some safety and security measures," Miller told Boise State Public Radio.
Three other children, who were relatives of the woman, witnessed the shooting.
"A very sad incident occurred at our store today involving the death of a female customer," Wal-Mart said in a statement, KREM-TV reported. "We are fully cooperating with the Kootenai County Sheriff's deputies as they investigate this matter."
The victim's father-in-law, Terry Rutledge, told The Associated Press that Veronica Rutledge "was a beautiful, young, loving mother."
"She was not the least bit irresponsible," he said. "She was taken much too soon."