The Dons loaned Smith, 21, to United in July and he has five goals this season.
Scotland Under-21 cap Smith made his Aberdeen debut in 2012 and has scored four times in 89 appearances for the Pittodrie side.
"It's a brilliant acquisition for us," boss Jack Ross told St Mirren's official website.
"Cammy is a really good player and someone I didn't think we'd be able to get because he was at Dundee United.
"He's a good, mature boy and I think he'll be a good fit and gives us another option in the attacking area."
Championship bottom side St Mirren host Falkirk on Saturday.
St Mirren have signed forward Cammy Smith on loan for the rest of the season after Aberdeen ended his spell with Dundee United.