The Cameroon international, who had been a long-term target for the Blaugrana, will now undergo a medical on Monday before penning a five-year deal – with a release clause set at €80m [£62.8m].
Song established himself as a key member of Arsenal's midfield last season and looks like being the second high-profile exit from north London this week, after the transfer of striker Robin van Persie to Manchester United was confirmed on Friday.
A statement on the Spanish giants' official website read: "FC Barcelona has agreed a deal with Arsenal FC for the transfer of Alex Song to Camp Nou. The fee is 19 million Euros.
"The Cameroon international midfielder will sign for the next five seasons with a release clause of 80 million Euros.
"On Monday he will have a medical and then join the rest of the squad for the official team presentation at the Gamper."
The 24-year-old spent seven seasons with the Gunners after being signed as a teenager from French club Bastia, making 204 appearances and scoring 10 goals, but last season alone the midfielder registered 14 assists.
Meanwhile, Arsene Wenger's side kicked off their Premier League campaign with a frustrating 0-0 draw at home to Sunderland as they look to rebuild their squad for a title push.