Ferrari's qualifying bid was derailed by team-mate Charles Leclerc's undiagnosed car issue that got the Monegasque driver eliminated in Q1 for the first time this season.
But in front of his Spanish fans, Sainz had a much stronger afternoon by taking second place behind the untouchable Red Bull of world champion Max Verstappen.
"It was very good today, I felt like I was driving very well," Sainz said about his best qualifying result of the 2023 F1 season.
"It's always one tenth here, one tenth there. But I was pushing, I didn't leave anything on the table today. I was pushing flat out.
"It was very tight even with McLaren, with Alpine, with Mercedes, Aston Martin; we were all in the same group basically this weekend. So, I think P2 is as far as I could make it today, and that [1m]12.7s is a pretty good lap."
Sainz said the low-grip conditions after earlier rain showers made Saturday "one of the trickiest" qualifying sessions ever at the Circuit de Barcelona-Catalunya.
The conditions caught several of his rivals out.
Source: Autosport