In just his fifth appearance for the club, 18-year-old Ilaix struck from the edge of the box seven minutes from time after being set up by Lionel Messi. Jordi Alba had opened the scoring in the first half, firing in from the left of the box after Messi played him in.
Barca were also indebted to goalkeeper Marc-Andre ter Stegen, who made a string of fine saves as they stretched their unbeaten run in La Liga to 16 games.
Academy graduate Ilaix provided the feel-good factor as Barca kept up their impressive form in the league. Koeman has shown a lot of faith in him over the past week, and threw him on with the game hanging in the balance at 1-0 with 25 minutes to go. He showed no sign of nerves as he cut inside his man before producing a good finish to wrap up the points for Barca at El Sadar, the same ground where Ansu Fati scored his first goal for the Catalan club.
The three points felt particularly important in the context of the midweek comeback against Sevilla in the Copa del Rey semifinal. It would have been easy to dip after that high, while it also turned up the pressure on leaders Atletico, who face third-placed Real Madrid in the Derby on Sunday.
The scoreline flattered Barca, who needed some big saves from Ter Stegen to keep them in front. On another night, they could easily have dropped points. Alba was also taken off late on with a knock. Barca will hope it's nothing given his recent form.
Manager rating out of 10
7 -- Koeman deserves a lot of credit for giving Ilaix a run of minutes in big games.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
GK Marc-Andre ter Stegen, 8 -- Made several impressive saves. The stops to deny Kike Barja and Ruben Garcia were probably the standouts.
DF Clement Lenglet, 7 -- Perhaps his best performance in 2021. Battled well against the Osasuna attackers and was confident on the ball.
DF Samuel Umtiti, 5 -- Booked for clattering into Roberto Torres in a dangerous area, although Lenglet's pass had sold him short. Taken off at half-time.
DF Oscar Mingueza, 7 -- Another mature performance as part of a back three in the first half and as one of two centre-backs after the break.
MF Sergio Busquets, 6 -- Came off after an hour following another solid display in the middle. Performs better with the protection of three centre-backs.
MF Pedri, 7 -- Rarely made a mistake with the ball at his feet. Almost scored, but his shot from 18 yards was too close to Sergio Herrera.
MF Frenkie de Jong, 7 -- Once again, the Dutch international didn't stop running. Dropped back when Busquets went off to build Barca's attacks from deeper.
MF Jordi Alba, 8 -- Scored his fifth goal of the campaign, matching his highest-ever total from the 2012-13 season. He's in great form in attack, where he benefits from a great relationship with Messi, but is also covering well in defence.
MF Sergino Dest, 6 -- Got into some good positions on the right and had the beating of his marker, but hesitated when it came to the final ball.
FW Antoine Griezmann, 6 -- Returned to the side after three games on the bench but was unable to make a case for more regular football.
FW Lionel Messi, 8 -- Set up both the goals and all Barca's attacks went through him, although his teammates' insistence on looking for him can often be a hindrance.
FW Ousmane Dembele, 6 -- Came on at half-time, but lacked a cutting edge in the final third.
MF Ilaix Moriba, 7 -- Added some fresh energy to midfield on a night he will never forget.
FW Martin Braithwaite, 6 -- Worked hard after coming on for Griezmann but had little luck in and around the area.
MF Riqui Puig, N/R -- Replaced Pedri after Ilaix's late goal.
DF Junior Firpo, N/R -- Given the final few minutes at left-back.