MADRID—Six-time Ballon d’Or winner Lionel Messi will leave Barcelona despite both parties having reached an agreement over a new contract, the La Liga club said on Thursday, citing economic and structural obstacles to the renewal of the deal. Messi, who joined Barca’s youth set-up aged 13, is the club’s all-time top scorer and appearance maker with 672 goals in 778 games in all competitions. The Argentina forward was free to negotiate a transfer with other clubs after his deal ran out at the end of June, but Barcelona had always maintained he wanted to stay with the club. Messi, who has spent his whole career at Barcelona, had been expected to sign a new five-year deal with the Catalan club, which would have included a salary reduction of 50 percent. Barcelona needed to financially restructure in order to get the deal over the line, which proved impossible in the end …