The 24-year-old scored one goal in four appearances at the Africa Cup of Nations and becomes the Birmingham club's ninth signing of the transfer window.
Known as "Trezeguet", Hassan has previously enjoyed stints at Anderlecht and Mouscron in Belgium after starting his career with Egypt's Al Ahly.
"We're really excited to work with 'Trez'. I've watched him a number of times," said Villa head coach Dean Smith.
"He's the type of wide player that we have been looking for who is direct, causes problems for the opposition in the final third and scores goals."
The club will now chase international clearance and a work visa for their latest recruit.
Villa have already signed former loan stars Kortney Hause and Tyrone Mings on permanent deals, and set a new club transfer record to bring in striker Wesley Moraes from Club Brugge for a reported £22.
Aston Villa start their Premier League campaign away at Tottenham on August 10.