The winger came off the bench to score an 80th-minute equaliser at the Wanda Metropolitano, after Joao Felix had originally opened the scoring for Diego Simeone's side.
Elanga's finish means both sides head into the return leg at Old Trafford on level terms, but Rangnick has now indicated he almost did not have the Sweden Under-21 international at his disposal.
The German stated Elanga had his heart set on more first-team minutes away from the club before he was convinced to stay after the former's arrival.
"Of course, I had heard about his name before [I joined] but I didn't know him as a player because he didn't play for Manchester United [the first team]," Rangnick said. "On the first training session, the night before the Crystal Palace game, he was the player with the best training performance, so I asked my colleagues and my staff members about him and then found out he had almost already decided to leave the club on loan.
"He came on against Palace as we all know and the week after I said, 'Listen, I want you stay and see how you do, how you are doing in training and the games until the closure of the transfer window'.
"I think right now he has just shown what is possible in football with the right mentality, the right approach to go into games. This is exactly what he did and what he always does in every training session."
Under Ole Gunnar Solskjaer, Elanga found his chances severely limited across the first half of the campaign, with the winger squeezed out of any senior game-time bar a 17-minute cameo against West Ham in United's Carabao Cup exit in September.
Since Rangnick took the reins, however, he has found himself a regular presence among the senior squad, making 13 appearances across all competitions.
Having stolen the show late on for a flagging United side in Madrid, Elanga will hope to feature when they return to Premier League action this weekend against Watford, whose 4-1 win over the Red Devils in November spelled the end for Solskjaer's time as manager.