Burns is to exit the Cherry and Whites this summer and will join the province ahead of the new season.
The 24-year-old, who made 29 appearances last season for Gloucester, was in Belfast on Monday to finalise the move and says he's looking forward to the new challenge.
He said on the Ulster website: "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."
Bryn Cunningham, Ulster's operations director, says the capture of Burns comes as a result of an exhaustive search to find a new number 10.
He 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."