Aston Martin's pace was an unknown factor heading into qualifying after Alonso and team-mate Lance Stroll finished 12th and 14th respectively in final practice.
Alonso also barely scraped by in Q1, with Stroll even eliminated in 18th. But in Q2 the two-time world champion came to the fore with third, under three tenths shy of pacesetter Max Verstappen.
In a disrupted Q3 shootout the Spaniard then grabbed a second starting spot alongside Red Bull's polesitter Sergio Perez.
According to Alonso, his "messy FP3" was caused by set-up experiments, but on a more familiar set-up his AMR23 "came alive" in qualifying.
"It was a good qualifying, I think FP3 was a little bit messy for us," he explained.
"We tried different set-ups and they didn't work, but the team obviously put the car in a more known place after the first four races and the car came alive in qualifying.
"So yeah, extremely happy with P2. Obviously, first row of the grid, let's see what we can do."
Source: Autosport