We have free will because we are created in God's image. The choice made by Adam and Eve to eat of the forbidden fruit was freely made when in a state of grace in paradise. They could have chosen otherwise. When Gabriel visited Mary at the Annunciation she could have said "No!"
to becoming the Mother of Christ, but humbly chose to accept. At the end of the Gospel of St John 6, we read that a number of those who had been drawn to Christ left him because of the difficulties of what he was saying. Yet many also stayed with Him.
In the course of Christ's preaching in Capernaum as related in John6 He tells us that people who come to Him are drawn (an energetic verb in the Greek original, being synonymous with pull, tug) by the Father, and we understand by the end of this chapter that both those who stay and those who leave were initially drawn to Him by the Father. The Second Letter of Peter 3:9 tells us that God "is not willing that any should perish, but that all should come to repentance." So all of us, in our fallen state, are being welcomed to repent and join God. Some agree, some refuse, some keep changing their minds, but the key point is that these differing responses are coming from we human beings who are suffering under the same fallen state.
The interaction of the work of God, the work of those who follow Him, the destructive efforts of the Devil and his demons, is a complex matter to follow, but if we did not have our ability to choose due to that image of God within us, then we would all be lost.