Matthew 6:14-15
14 For if ye forgive men their trespasses, your heavenly Father will also forgive you:
15 But if ye forgive not men their trespasses, neither will your Father forgive your trespasses.
Mark 11:25-26
25 And when ye stand praying, forgive, if ye have ought against any: that your Father also which is in heaven may forgive you your trespasses.
26 But if ye do not forgive, neither will your Father which is in heaven forgive your trespasses.
These are verses that are often used by the type of works Salvationist that subscribes a view of Salvation that has dozens of criteria, often called "the economy of Salvation" by Roman Catholics in particular. They will use this verse to indicate that if you are unforgiving, your chances of being forgiven are diminished, therefore you're less likely to get to Heaven.
This self-righteous nonsense demonstrates that such people know next to nothing about the New Testament, the reason Jesus died, or the concepts of fellowship vs judicial forgiveness, all of which can be proven and explained simply and concisely.
The fact that those being addressed have a "Heavenly Father" shows that they are children of God, and members of God's family. It is only possible to be "born again" (John 3:3-7) into God's family one way, and that is by faith:
1 John 5:1
1 Whosoever believeth that Jesus is the Christ is born of God: and every one that loveth him that begat loveth him also that is begotten of him.
John 1:12 and Galatians 3:26 also bear witness to this fact. You become a child of God by faith alone.
And since a child of God can never lose their Salvation (Ephesians 1:13-14), this passage cannot possibly be teaching that if you are unforgiving that you will be sent to Hell. That would necessitate works on our end, but Salvation is free (Romans 3:24) and not of works (Romans 4:5, Ephesians 2:8-9). Therefore we do not have to do the good work of forgiving others liberally in order to go to Heaven.
The Bible is clear that the only thing that God accepts as payment for sin is blood atonement (Leviticus 17:11, Hebrews 9:22), meaning sins cannot be paid for by forgiving others or by doing good deeds.
Rather, our once-for-all forgiveness, which I'll term "judicial forgiveness", was obtained by the death of Jesus Christ:
Hebrews 9:12
12 Neither by the blood of goats and calves, but by his own blood he entered in once into the holy place, having obtained eternal redemption for us.
This sacrifice is the believer's sole claim to payment for sin:
Colossians 1:14
14 In whom we have redemption through his blood, even the forgiveness of sins:
Ephesians 1:7
7 In whom we have redemption through his blood, the forgiveness of sins, according to the riches of his grace;
Notice above that this redemption and forgiveness is given by "the riches of (God's) grace". If it's given by grace, good works, such as forgiving other people, cannot be involved in any way, shape, or form (Romans 11:6).
The atoning death of Jesus is what secured our judicial forgiveness before God. This is why we are said to be "washed" (past tense) from all of our sins by the blood of Christ:
Revelation 1:5
5 And from Jesus Christ, who is the faithful witness, and the first begotten of the dead, and the prince of the kings of the earth. Unto him that loved us, and washed us from our sins in his own blood,
This once-for-all forgiveness and justification is received by faith alone plus nothing:
Acts 13:38-39
38 Be it known unto you therefore, men and brethren, that through this man is preached unto you the forgiveness of sins:
39 And by him all that believe are justified from all things, from which ye could not be justified by the law of Moses.
In light of all this, it is absurd, and extraordinarily ignorant to declare that such a forgiveness can be purchased by your cheap "good works". It's a free gift paid for by the death of the King of creation.
But if all of our sins are paid for, does that mean that our fellowship with God is perfect and our actions no longer have consequences? No. A term commonly used for temporal forgiveness of sins in regard to God's chastening of His children on earth (Hebrews 12:6) is "fellowship forgiveness".
If you miss the distinction between our once-for-all payment for sin made by Jesus Christ (Hebrews 10:10) versus the forgiveness that we obtain from God as part of our earthly fellowship with Him, you will have to admit that Salvation is not by faith alone, and that Jesus Christ didn't do anything to save you.
This is why John talks about confessing our sins as a way to restore fellowship with God, and we are forgiven in the sense that we restore our relationship with Him as it pertains to our Christian walk here on earth (as well as helping to avoid His chastening):
1 John 1:9
9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
If you forgive others, and confess your sins to God, He will be lenient to you in regard to how He handles your sins here on earth. You don't get to Heaven by forgiving others. You don't get to Heaven by confessing your sins.
Those things affect your standing with the Lord as your righteous Father who will chasten you, not your eternal status as a child of God who is washed clean in the blood of the Lamb (Revelation 7:14).
In conclusion, no, this verse does not teach that you have to be forgiving in order to get to Heaven. Obviously, you should still be forgiving, but I would hope that goes without saying.
However, twisting this passage to be in regard to eternal Salvation fosters a cold, forced forgiveness. You forgive the person because you don't want to be sent to Hell, not because you love Jesus Christ and want to reciprocate the forgiveness He's given you.
When you meditate on the mercy of Jesus Christ towards you in paying for your sins, you should be compelled to be merciful to others. If not, God will be less forgiving of you as it pertains to your sins, but this has nothing to do with the fact that all of your sins are paid for in an eternal sense by Jesus Christ.