Marcelo Bielsa's Whites fell behind after just nine seconds following a Robin Koch own goal but United led 2-1 at the break after Mateusz Klich and Patrick Bamford struck.
Unai Emery's La Liga outfit then drew level in the 81st minute through Dani Raba as part of an entertaining contest that was played behind closed doors at York City.
Leeds United writer Lee Sobot hands out the scores from the final warm-up game ahead of next Saturday's Premier League opener against arch rivals Manchester United at Old Trafford.
1. Illan Meslier
7 - Had no chance with Robin Koch's own goal and went on to make some important stops, saving the best until last when somehow keeping out Dia's header from close range in the 88th minute. Photo by Jon Super - Pool/Getty Images.
2. Luke Ayling
6 - Deployed as a centre-back in moments of need during pre-season but again looked far more comfortable at right back. Not a vintage Ayling display but solid enough against top opposition. Photo by Lewis Storey/Getty Images
3. Liam Cooper
8 - A real captain's performance on the left of a three-man centre back axis. Stood up admirably to a talented front line and produced a thumping header that led to Bamford's goal. Very vocal, particularly in helping Struijk. Photo by Getty Images.
4. Pascal Struijk
8 - What a find he has been and can be proud of another very good showing in defence, this time as the middle member of a three-man back three. Put himself about and encouraged along by a vocal Cooper. Photo by Tony Marshall/Getty Images.