John told the people that the Messiah (Jesus) would both judge and give grace. Like John, Jesus called people to repent. Those who receive the gift of faith and repent are gathered into God's kingdom. Those who reject Jesus and refuse to repent will be judged eternally.
God's grace and judgment meet at the cross of Christ. Sin must be punished. Innocent Jesus is judged and found guilty by sinful men so that He can die in our place. Jesus paid the price for sin in full so that we can be forgiven and receive God's grace. Jesus died in our place, the greatest act and gift of love ever.