Burns made his Gloucester debut as a 17-year-old in an LV= Cup fixture at London Irish in 2012, before making his Aviva Premiership bow against Worcester Warriors in 2014.
The 24-year-old has now made over 100 senior appearances for the Cherry and Whites. He played 29 times last season, including 24 starts.
Billy, who visited Kingspan Stadium on Monday to finalise the deal, said:
“This is a great opportunity for me to take the next step in my career and I’m very grateful to Gloucester for supporting me in this decision.
“The Ulster squad is brimming with established and developing talent, and it will be exciting for me to challenge myself in a different environment.
“I’m really looking forward to linking up with the squad next week and getting stuck into pre-season training. Hopefully I can show the Ulster supporters what I’m all about and contribute to the team in what is a hugely important season.”
Commenting on the capture, Bryn Cunningham, Ulster’s Operations Director said:
“We’re delighted that Billy has signed with us for the next two seasons. It has not been an easy process to find someone with the requisite abilities to add real value to our squad for this season, but thankfully we’ve come to an agreement with Gloucester and have been able to bring Billy across.
“Johnny McPhillips has developed brilliantly and Michael Lowry has shown that he’s a serious talent, but it was critical that we had another recognised 10 with a good level of experience, otherwise we simply would’ve been short of numbers in that area. The addition of Billy now gives us an exciting array of young talent to call upon in the coming years.
“Billy has an impressive range of skills and has gained a considerable amount of experience for an outhalf of his age. Importantly, being Irish-qualified, we have no doubt that Billy has the potential to represent Ireland in the near future.”