Gunnarsson, who represented Iceland in their recent match against Wales, previously played for the Dutch team AZ Alkmaar, but was confined to the bench for most of the season.
The young Iceland international is one of two signings for the club, along with Guillaume Beuzelin who joined the club from Scottish club Hibernian.
City boss Chris Coleman told the club website: “We were not the only club interested in him and he has got lots of quality.
“He’s already proven that he is capable of playing on the biggest stage. I have no doubt he has got the ability to be an important player for us next season.”