The 23-year-old, who was born in Devon, will make the move to Sandy Park before the start of next season.
Lewis, who was on the books of the Chiefs as a youngster, is delighted to be moving home.
"It's exciting and I am really looking forward to the movek," he said. "In a strange way it's like going home for me because I still have my family and a lot of friends down in Devon."
Exeter coach Rob Baxter added that he is delighted to have captured Lewis.
"Dave is a young guy with bags of Premiership experience already and things have changed a little bit at Gloucester with Jimmy Cowan turning up there," said Baxter.
"He's a local guy and if he was based at Ivybridge now in our academy, he would never have gone through our fingers and would be playing at Exeter so it's nice to get a local lad back."
Chiefs travel to Saracens in the Aviva Premiership on Saturday.