It is not clear if this fear came only on believers or also unbelievers. In context it probably refers primarily to believers, the church community. They see and hear what happens to Ananias and come to realize that what happened to him can also happen to them. In this sense they are confronted with the reality that God is holy and he hates sin.1 Not even God’s people may trifle with him and his holiness.2
5 When Ananias heard these words, he fell down and breathed his last. And great fear came upon all who heard of it.