Long (19) spent three years at Motherwell, winning the Scottish Youth Cup there before joining United in the summer of 2016.
He has since had spells on loan at Forfar, Clyde and Cliftonville.
Elgin manager Gavin Price gave his new recruit a first taste of action in Saturday's friendly against junior side Jeanfield Swifts at Forfar's Station Park.
Price was keen to take in another keeper with recent signing Iain Ross picking up a groin injury which is set to keep him out for at least another month.
The Elgin manager's connection with Dundee United goalkeeping coach Stuart Garden led to a deal being struck until the end of the season.
Long played one game for Clyde in a 3-0 defeat at Stirling a year ago.
He also featured for Northern Irish league Cliftonville in a 2-1 defeat against Crusaders in August.
He will be competing with regular Marc Waters for the City number 1 shirt when they play host to Stenhousemuir on Saturday.