The gift is free in the sense that we do not do anything in order to get it. We can not buy our salvation nor can we do anything in order to obtain salvation. The gift is for the Lord's elect, not everyone. Christ payed the price for the salvation of his elect.
Here is a verse that is widely used to get people to think they have to "accept" Christ in order to obtain salvation.
Joh 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
The word "world" in this verse is kosmos in the Greek language.
Probably from the base of G2865; orderly arrangement, that is, decoration; by implication the world (in a wide or narrow sense, including its inhabitants, literally or figuratively [morally]): - adorning, world.
In this verse kosmos is meaning the adorning, if it were meaning the world then all the world would be saved and none would go to hell as you stated with your question. However the Bible tells us that some do go to hell, therefore the word 'world' here has to mean adorning rather than world.
The Bible teaches us that nothing we do will can get us saved. Not believing, not accepting, nothing. Belief is the cause of salvation, and it is Christ who make us acceptable. Christ has done it all for those who are predestined before the foundation of the world.
Eph 2:8 For by grace are ye saved through faith; and that not of yourselves: it is the gift of God:
Eph 2:9 Not of works, lest any man should boast.
Eph 2:10 For we are his workmanship, created in Christ Jesus unto good works, which God hath before ordained that we should walk in them.
Eph 1:4 According as he hath chosen us in him before the foundation of the world, that we should be holy and without blame before him in love:
Eph 1:5 Having predestinated us unto the adoption of children by Jesus Christ to himself, according to the good pleasure of his will,
Eph 1:6 To the praise of the glory of his grace, wherein he hath made us accepted in the beloved.
Eph 1:7 In whom we have redemption through his blood, the forgiveness of sins, according to the riches of his grace;
Eph 1:8 Wherein he hath abounded toward us in all wisdom and prudence;
Eph 1:9 Having made known unto us the mystery of his will, according to his good pleasure which he hath purposed in himself:
Eph 1:10 That in the dispensation of the fulness of times he might gather together in one all things in Christ, both which are in heaven, and which are on earth; even in him:
Eph 1:11 In whom also we have obtained an inheritance, being predestinated according to the purpose of him who worketh all things after the counsel of his own will: