The deal could be worth €22m in total if a series of add-ons are met, while Barca will also be due 10% of any future transfer.
Ilaix, 18, has signed a five-year deal with the Bundesliga side after opting against extending his contract with Barca, which was due to expire in 2022.
“I’m really happy that my move to RB Leipzig has worked out,” Ilaix said in a statement. “This is an exciting club that has always had an attacking style of play, so it fits my game really well.
“I am convinced this is the ideal next step for my career and my development — that was ultimately the reason for my decision to change.”
Ilaix joined Barca from rivals Espanyol in 2010, progressing through the club’s academy before making his first-team debut earlier this year under Ronald Koeman.
He made 18 first-team appearances for the club last season, scoring one goal, and the Catalan side were keen to extend his contract.
However, Barca were unable to reach an agreement with Ilaix’s agents over a new deal, which led to a standoff between the two parties.
Barca relegated him to train with the B team in preseason and told him he would spend the season on the sidelines if a club did not meet their €20m asking price.
Leipzig’s first offer of around €6m was turned down, but they returned to the negotiating table over the weekend and reached an agreement with Barca.
“We have signed an exceptional talent,” Leipzig’s commercial director Florian Scholz said. “We are very proud that, despite the many offers from top European clubs, he decided on RB Leipzig.
“Ilaix has been a target for many months and we have thus succeeded in achieving a sustainable transfer with a clear focus on our future.
“Despite his age, Ilaix has come a long way personally. He has a great mentality and will strengthen our team in the long term. But it is also a step into a new country with a new language. As a young player with us, he will have the time he needs to settle in and integrate into the team.”