The 22-year-old spent last season on-loan at Tottenham but did not make a first-team appearance as he was third choice goalkeeper behind Hugo Lloris and Michel Vorm.
Lopez made his professional debut for Espanyol in 2014 in the Copa del Rey and the Catalonia international helped to steer his side to the semi-finals of the competition for the first time in nine years.
He made his first La Liga appearance in 2015 when former Espanyol goalkeeper Kiko Casilla got himself sent off in a defeat to Sevilla.
After Casilla departed for Real Madrid two years ago, Lopez became first choice at Espanyol and made 38 league appearances.
Lopez would be the second goalkeeper to join Chris Hughton's side this summer after they brought in Australia international Mathew Ryan from Valencia earlier in the window.