The 30-year-old, whose contract was up this summer, was keen to stay in England to remain in contention for the national team, reports BBC Sport.
"I've always enjoyed playing at Kingsholm and am excited at the prospect of spending the next few years in Cherry and White and playing in front of the Shed," Cipriani told Gloucester's official website.
"Having spoken in depth with David Humphreys and Johan Ackermann, the future they have planned for the club is enticing and one that I very much want to be part of. It's the most exciting move of my career to date.
"I've still some important rugby to play for Wasps in the meantime and, when the time comes, it's probably going to be an emotional farewell."
Cipriani recently forced his way back into the England squad after a three-year absence.