The 24-year-old, who will join the Midlands club for an undisclosed fee, finished the campaign with six goals in 37 appearances in all competitions.
"Anwar proved to everybody at Wembley how good a player he can be for Aston Villa," Villa manager Dean Smith said in a statement.
"He's ready for the step up to the Premier League and he's a young player who has an awful lot of potential. It’s now my job and the job of the coaching staff and Anwar himself to fulfil the potential that he undoubtedly has."
El Ghazi is Villa's second signing of the close season, following last week's addition of Birmingham City forward Jota.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
(Reporting by Hardik Vyas in Bengaluru; Editing by Christian Radnedge)
