The midfielder, who turns 18 on Monday 16 December, has played 30 times for the club - scoring seven goals - the latest of which came in Saturday's 4-1 victory at Kilmarnock.
Manager Jackie McNamara said: "Ryan is showing his commitment to the club by signing this contract. We are trying to build something special here and securing Ryan on a longer deal signals our desire to achieve this.
"He is a fantastic talent who appreciates that Dundee United is the best place for him to develop at this time. Dundee United fans will quite rightly be delighted at this news and how the club is moving forward just now.
"He's going to be a massive star in our national team, there's no doubt about that. He will be one of the greats of our game."
The much-coveted midfielder, dubbed the mini Messi, signed a contract extension just last month, but United chiefs were unable to offer a longer deal until the midfielder had turned 18.
He has been attracting interest from scouts across Europe and is just one of several exciting prospects that have emerged from the Tannadice academy, including John Souttar and Stuart Armstrong.