The Guinness Premiership club have confirmed their swoop for the 28-year-old, who will link up with his former Bulls team-mate Karl Pryce at Kingsholm next season.
Blockbusting wing Vainikolo has scored 143 tries in 146 games for Bradford since joining them from Australian side Canberra Raiders in 2002.
He was released by the Bulls midway through his current contract after a personal request from the player. He joins Gloucester on July 1.
Vainikolo said: "First and foremost, I want to take this opportunity to thank everyone connected with Bradford Bulls - including my team-mates, staff and supporters - for making the last five years so memorable.
"Bradford is my home and I know I will be back. I am determined to go out on a high, and I want to contribute as much as possible over the next six weeks before I make the switch.
"I am really proud to be joining a club of Gloucester's reputation. They have shown this season what potential they have in reaching the Premiership final, and having met with Dean Ryan and the other coaches I know there isn't a better place for me to learn about union."
Vainikolo will add power and pace to a Gloucester back division found wanting in that area against Leicester at Twickenham last Saturday when Tigers' Samoan strongman Alesana Tuilagi caused havoc.
On the international stage, Vainikolo has scored 14 tries in 12 appearances for New Zealand, including nine during the 2000 rugby league World Cup.
He becomes the latest high-profile Gloucester signing for next term, following the likes of Australian Test hooker Jeremy Paul and Wales scrum-half Gareth Cooper.
Gloucester head coach Ryan revealed the club first spoke on an informal basis with Vainikolo a couple of years ago about a possible code switch.
Ryan said: "I am absolutely delighted we have signed Lesley. He has the potential to be a world-class player in rugby union.
"We had informal discussions a couple of years ago about a possible move, and we heard his desire to play for Gloucester was still strong, we moved quickly.
"His try-scoring record is without equal, and the challenge now is for us to create the opportunity to transfer his abilities to 15-a-side rugby.
"The modern game requires power as well as pace, which Lesley will bring us."