The 21-year-old Spaniard spent the 2013-14 season on loan at Goodison Park and made 29 appearances, scoring three Premier League goals.
“Gerard needs no introduction to anyone here at Everton, for we are all well aware of his incredible footballing talent,” Everton manager Roberto Martinez told the club's website.
“We got to know him really well from his loan period, not only as such a talented player but also his great character. He will be a fantastic asset to our club.”
The contract includes a release clause if Barcelona make an offer meeting certain requirements within the first two years, and the European champions also have a right of first refusal if the Premier League club decide to sell Deulofeu, Everton said.
Deulofeu, who spent last season on loan at Sevilla, is Everton's second signing of the close season following the arrival of midfielder Tom Cleverley from Manchester United on a free transfer.
Original source: Everton sign Barcelona winger Deulofeu