The Brazilian centre-back made a total of 64 appearances for the Gunners after joining from Villarreal for about £11m in January 2015.
The 26-year-old helped Arsene Wenger's side win the FA Cup in 2015 and 2017.
"We would like to thank Gabriel for his contribution to the club and to wish him well for his return to La Liga with Valencia," Arsenal said.
The La Liga club, who finished 12th in the Spanish top flight last season, said Gabriel has signed a five-year contract until 2022.
Find all the latest football transfers on our dedicated page.
Arsenal defender Gabriel Paulista has joined Spanish club Valencia for an undisclosed fee.