“For if you forgive others their trespasses, your heavenly Father will also forgive you, but if you do not forgive others their trespasses, neither will your Father forgive your trespasses.” (Matthew 6:14–15, ESV)
There is a connection between our ability to forgive those who have sinned against us and our ability to receive forgiveness from God, as was already communicated in Jesus’ model prayer.
The issue doesn’t appear to be an if/then statement as much as it is a revelation of the state of being of the person in question.
The person who is able to forgive others who have truly sinned against him has truly received the forgiveness of the Father.
Those who can’t find it in their hearts to forgive, it doesn’t appear they ever got it into their hearts in the first place.
Why does Jesus repeat himself on this particular issue one might wonder–just in case you missed it the first time (cf. Matthew 6:12).