Jesus 'HAD' authority/power to forgive sins because it was GIVEN him from Almighty GOD.
(Mat 9:4-8 ) And Jesus knowing their thoughts said, Wherefore think ye evil in your hearts? 5 For whether is easier, to say, Thy sins be forgiven thee; or to say, Arise, and walk? 6 But that ye may know that the Son of man hath power/AUTHORITY on earth to forgive sins, (then saith he to the sick of the palsy,) Arise, take up thy bed, and go unto thine house. 7 And he arose, and departed to his house. 8 But when the multitude saw it, they marvelled, and glorified God, which had given such power/AUTHORITY unto men.