Deulofeu fired in a late penalty, after Gaya gave Spain U21's the lead against a defensive-minded Estonian side.
As is often the case for Spain U21's, they found themselves facing a side content to park the bus in Tallin, in their opening European Championship qualifier against Estonia on Wednesday night.
For much of the first-half, the Estonian side erected a wall of nine players around the edge of their area, as the Spaniards tried to find a way to break through. Whenever they did find a chink in the armour, goalkeeper Tamme was there to make important saves.
Despite the best efforts of Deulofeu on the right, Denis Suarez on the left and Munir through the middle, the Spaniards were frustrated in the first forty-five minutes, whilst Arsenal youngster Hector Bellerin was desperately unlucky, striking the woodwork with a good effort.
After the break La Rojita maintained their pressure, with wave after wave of attacks, virtually all the play being inside the Estonian half. Denis Suarez denied by Tamme after two good opportunities following the restart.
Still the Spanish youngsters pushed and pushed, whilst the Estonians continued to frustrate, with their only attempts to get forward coming from long defensive clearances, seeking counter-attacking opportunities.
Eventually the breakthrough came in the 82nd minute, thanks to Deulofeu battling to craft an opening and with Valencia starlet Gayà bursting between markers to apply the finish.
Estonia now had to push forward if they wanted anything from the game, which provided a little more space for Spain. They exploited that and in the second minute of stoppage time, Barcelona forward Munir was felled inside the area.
0-2 the final score for Spain U21's, securing three points from their opening encounter, as they look to make their way to the UEFA 2017 European Championship finals, which are set to take place in Poland.
Estonia U21: Tamme, Ojamaa, Avilov, Slein (85' Käit), Sappinen, Liivak, Marin (85' Ainsalu), Gussev, Aloe (76' Paju), Kirss, Vihmann.
Spain U21: Arrizabalaga, Bellerín, Gayà, Jonny, Duarte, Saúl Ñíguez, Deulofeu (90+3' José Rodríguez), Óliver Torres, Munir, Ceballos (61' Castillejo), Denis Suárez (79' Santi Mina).
Goals: Gayà (82'), Deulofeu (pen. 90+2')