Security guards killed the attacker - said to be a local resident born in 1995 - but two of them were wounded in the process.
The gunman was shot dead by police.
According to a local official, the assailant was a local man in his early twenties, the Interfax news agency reported. The region has also seen a large number of people join Islamic State terror group, according to Reuters.
"I believe God saved us, not allowing the man to get inside the church".
All of those killed were reportedly women.
"He was carrying a rifle and a knife", he added.
At least five women were killed in a shooting outside of a church in Russia Sunday.
There was no immediate indication on the motive for the shooting.
Two wars for independence in Chechnya and widespread corruption have left the region destabilized.
Sunday's shooting comes exactly one month before the March 18 presidential election that Vladimir Putin is nearly guaranteed to win.