Rosberg secured pole with his first run on medium tyres in Q3, posting a best time of 1:24.681.
Hamilton, on pole in the first four races of the season, was unable to respond to that and will start from second place.
The Mercedes duo proved to be in a class apart, with Sebastian Vettel third in the Ferrari, but over seven tenths of a second behind Rosberg.
Valtteri Bottas will share the second row of the grid with Vettel after putting the Williams in fourth place.
Toro Rosso driver Carlos Sainz delighted his home crowd with a sensational fifth place, his best ever qualifying result so far.
Teammate Max Verstappen was sixth, as Toro Rosso outpaced sister team Red Bull once again.
Daniil Kvyat will start from eighth, while teammate Daniel Ricciardo qualified tenth, behind the second Williams of Felipe Massa.
For the first time this year, neither Lotus made it into the top ten.
Romain Grosjean was 11th fastest, while teammate Pastor Maldonado will start from 12th.
Despite higher hopes for the first race of the European season, McLaren endured another disappointing day as both its drivers failed to reach Q3.
Local hero Fernando Alonso will start from 13th position, in front of teammate Jenson Button, who complained of brake problems and a general lack of grip.
Pos | Driver | Car / Engine | Time | Gap |
1 | Nico Rosberg | Mercedes | 1’24.681 | |
2 | Lewis Hamilton | Mercedes | 1’24.948 | 0.267 |
3 | Sebastian Vettel | Ferrari | 1’25.458 | 0.777 |
4 | Valtteri Bottas | Williams/Mercedes | 1’25.694 | 1.013 |
5 | Carlos Sainz | Toro Rosso/Renault | 1’26.136 | 1.455 |
6 | Max Verstappen | Toro Rosso/Renault | 1’26.249 | 1.568 |
7 | Kimi Räikkönen | Ferrari | 1’26.414 | 1.733 |
8 | Daniil Kvyat | Red Bull/Renault | 1’26.629 | 1.948 |
9 | Felipe Massa | Williams/Mercedes | 1’26.757 | 2.076 |
10 | Daniel Ricciardo | Red Bull/Renault | 1’26.770 | 2.089 |
11 | Romain Grosjean | Lotus/Mercedes | 1’27.375 | 2.694 |
12 | Pastor Maldonado | Lotus/Mercedes | 1’27.450 | 2.769 |
13 | Fernando Alonso | McLaren/Honda | 1’27.760 | 3.079 |
14 | Jenson Button | McLaren/Honda | 1’27.854 | 3.173 |
15 | Felipe Nasr | Sauber/Ferrari | 1’28.005 | 3.324 |
16 | Marcus Ericsson | Sauber/Ferrari | 1’28.112 | 3.431 |
17 | Nico Hülkenberg | Force India/Mercedes | 1’28.365 | 3.684 |
18 | Sergio Pérez | Force India/Mercedes | 1’28.442 | 3.761 |
19 | Will Stevens | Marussia/Ferrari | 1’31.200 | 6.519 |
20 | Roberto Merhi | Marussia/Ferrari | 1’32.038 | 7.357 |