The Welshman, 29, joined Scarlets in 2004 before leaving in 2008. He then returned to the club in 2011 following spells with Newport Gwent Dragons and London Welsh.
"I've known Aled for a long time and he's a very talented player," director of rugby Nigel Davies told Gloucester's official website. "He's got a fine tactical kicking game, can bring the best out of the players around him and, importantly, is a high-percentage goal kicker.
"Aled's signing will give us an additional option at half back and I'm pleased with how the squad is shaping up for next season."
Gloucester return to action on Saturday when they travel to Exeter Chiefs in the Aviva Premiership.