The 31-year-old stopper moved for a fee which could rise to €4 million (£3.5m) according to Spanish reports.
"The Croatian goalkeeper signs for four seasons up to June 30th, 2030," said Barça in a statement.
Livakovic, who was loaned to Girona last season by Fenerbahce but did not play, made penalty shootout saves against Japan and Brazil in the 2022 World Cup, helping Croatia reach the semi-finals.
Livakovic, who also played for Croatia at this summer's World Cup, joins veteran Pole Wojciech Szczesny as backup to Barça's number one, Joan Garcia.
