Midfielder Gomes, an influential member of Portugal’s European Championship-winning team in 2016, has won league titles with Barcelona and Benfica and was instrumental in the Portuguese club’s run to the Europa League final in 2013.
“I’m delighted to sign for this fantastic club - it’s a good day for me,” said Gomes.
“Everton always was a big option for me, especially after speaking with the coach, Marco Silva.
“Every discussion we’ve had was very important in making me feel his confidence about my game.
“Everybody in Portugal knows how Marco Silva works and his abilities as a coach.
“For me, it was really good to speak to him because I know how good he is and I feel motivated to work with him and to play for Everton, a great club.”
After signing for Benfica as an 18-year-old, Gomes swiftly made 28 appearances before moving to Valencia in July 2014, initially on loan.
Over two campaigns, he amassed 78 appearances, scoring three goals.
He completed a £29million transfer to Barcelona in 2016.
Competing in a midfield that included Sergio Busquets, Ivan Rakitić and Andres Iniesta, Gomes made 78 league appearances in the past two seasons, helping Barca secure the Copa del Rey in his first campaign and a League and Cup double last season.