A Utah police officer who was being attacked on Friday was saved by a passerby with a concealed pistol, officials said.