The animal, described by police as a pit bull, attacked the 52-year-old in Holwick Road, Northern Moor, Manchester at 20:25 GMT on Wednesday.
She suffered injuries to her right arm. A 34-year-old man who helped fight off the dog also suffered "numerous bites".
A witness said about 20 people were "whacking the dog to get it off them".
Jade Royle, 21, said: "It was horrible, all the neighbours were out.
"Everyone was screaming. It was scary. She is very lucky to be alive."
The woman and the man were taken to Wythenshawe Hospital and she has undergone surgery.
The owner of the dog has agreed to have it put down and an investigation was "ongoing", police said.
Det Sgt Sandra Callender of Greater Manchester Police said: "It took a number of people to restrain the dog until police arrived and I would like to personally thank them for their actions.
"Had they not helped this woman and held on to the dog until we arrived then we could possibly have seen more injuries."
A woman suffered "severe" injuries when she was mauled by her son's dog while walking it for him as a favour, police said.