A couple of superb blocks by home captain Emma McMaster helped Northern Ireland hold out before Lucia Garcia put Spain ahead on 30 minutes.
Spanish captain Patricia Guijarro doubled the lead with a tremendous dipping shot in the 52nd minute.
While Spain bossed the game, Abbie Magee went close for the hosts.
Substitute Magee tested Spanish keeper Noelia Ramos in the 74th minute after a brilliant run out of defence by Megan Bell.
The hosts are making their first appearance in the finals while Spain have been runners-up in three of the last four Uefa Under-19 women's tournaments.
Also in Group A, Germany beat Scotland 3-0 while in Group B England edged out Italy 2-1 at Mourneview Park. The Netherlands beat holders France 2-1 at the Ballymena Showgrounds.
Northern Ireland will be back in action in Friday's second round against Scotland at Mourneview Park with England taking on the Dutch at Windsor Park on the same day.
In front of a record 4,200 crowd for a women's match in Northern Ireland, Spain missed two chances in the opening four minutes as McMaster cleared a point-blank Laura Perez chance off the line before the same player then blazed over with the goal gaping.
As Northern Ireland full cap McMaster continued to make a number of brilliant interventions, the dominant Spaniards were frustrated until Perez's run set up Garcia to poke into an empty net in the 30th minute.
Northern Ireland's defensive discipline continued in the second half and it took skipper Guijarro's brilliant 52nd-minute dipping shot to beat Northern Ireland keeper Lauren Perry again.
The Spaniards continued to miss chances and Magee almost pulled a goal back 16 minutes from time after Bell sprinted from the edge of her own penalty area to the Spanish half.
Northern Ireland manager Alfie Wylie said he was proud of his players' efforts in frustrating the talented Spaniards for long periods.
"Despite being 1-0 down at half-time, they refused to feel sorry themselves in the second half and kept battling," said Wylie, who is also the Northern Ireland women's senior manager.
"They gave it absolutely everything tonight and I'm so proud of them."
Spain clinched a dominant 2-0 victory over battling hosts Northern Ireland at Windsor Park as the European Under-19 Women's Championship kicked off.