Alejandro Garnacho gave United the lead in the first half.
But Ten Hag’s side needed to beat the LaLiga side by two clear goals in order to finish top of Group E.
United looked disjointed for large parts of the second half and Ten Hag opted to introduce Harry Maguire as a makeshift striker late on.
The change, however, proved unsuccessful as United were unable to get that crucial second goal.
“It’s clear, we needed the goal, then we went more opportune.
“With Cristiano and Harry Maguire, you have two good headers and we tried to go more direct into the box and I think we did several times, quicker to get into the box for the opponent,” Ten Hag told BT Sport