Sure. That's why people have followed Erdogan's call and gone on the streets to oppose the Army. If Erdogan was so unpopular, he would have been quashed tonight. A few hours in, this coup is nearing its end, it appears.
Him being as popular as he is is part of the unconstitutional way of his presidency, though. Controlling the media, law, oppositional parties without legal basis. How do you get rid of someone like that? Someone who was elected by the majority but misuses his power? Someone who made sure that this misuse cannot be punished?
How much undemocratic and illegal actions are justified by a democratic election and popularity? What (legal and illegal) measures are justified and also promising to undo such a problem?
It*s not that easy... Of course he is popular, that alone doesn't mean a lot.