The expression is parallel to “God is light” (1 Jn 1: 5) and “God is love” (1 Jn 4: 8). All the three point to the dealings of God with human beings, through his salvific interventions. God is one who acts in the history. So God is Spirit towards human beings and God gives the Spirit (Jn 14: 16).
In her response, the woman refers to the messianic expectations of Samaritans. They did not use the categories of an anointed King from the family of David but a teacher [Taheb: Taeb (Hebrew)] or of one who returns [Šub (Hebrew)] on the basis of Deuteronomy 18: 15, 18. They waited for a prophet like Moses. Jesus identifies himself with the great prophet.