The Spaniard waited until the final moments of the session to smash the lap record with a time of 1m47.804s. Jorge Lorenzo was the first to beat Casey Stoner's record time and held provisional pole until Stefan Bradl and Marquez demoted him in quick succession.
Lorenzo soon picked up the pace but with his works Yamaha down on outright speed along the straight in the final sector, he was unable to reclaim his place at the top of the timesheets.
"In all honesty, it was a tough battle for pole as Jorge and Dani were both very fast," 20-year-old rookie Marquez told reporters.
"With the second set of tyres I found something extra and this allowed me to take pole. It will be important to manage the tyres well tomorrow."
World champion Lorenzo was happy enough to be second on the grid as he goes in search of a third consecutive victory following wins in Britain and San Marino.
"I am pleased because I didn't expect to round in (1:47.814). It's an incredible time on this circuit," the Yamaha rider said.
"Second place is very good for tomorrow and the important thing is that it doesn't rain and we can set a good rhythm for the race."
Dani Pedrosa joins team-mate Marquez on the front row in third, he was fastest in the final free practice session and looks strong ahead of tomorrow's race. Valentino Rossi starts from fourth alongside Bradl, who dropped down the order during the flurry of activity towards the end of the session, with Alvaro Bautista claiming sixth for Gresini.
Tech 3's Cal Crutchlow and Bradley Smith are on the third row of the grid. Smith was forced to participate in Q1 after struggling during practice, but alongside Andrea Iannone was able to escape into Q2 and found sizeable gains to capture eighth.
Pramac's new recruit Yonny Hernandez had threatened to upstage Iannone towards the end of Q1 when he temporarily went second quickest, but starts from 13th. Newcomer Luca Scassa and returnee Damian Cudlin were 22th and 24th for Cardion AB and Paul Bird respectively.
1. Marc Marquez (Spain) Repsol Honda Team 1:47.804
2. Jorge Lorenzo (Spain) Yamaha Factory Racing 1:47.814
3. Dani Pedrosa (Spain) Repsol Honda Team 1:47.957
4. Valentino Rossi (Italy) Yamaha Factory Racing 1:47.962
5. Stefan Bradl (Germany) LCR Honda MotoGP 1:48.128
6. Alvaro Bautista (Spain) Honda Gresini 1:48.302
7. Cal Crutchlow (Britain) Monster Yamaha Tech 3 1:48.653
8. Bradley Smith (Britain) Monster Yamaha Tech 3 1:48.854
9. Andrea Dovizioso (Italy) Ducati Team 1:49.219
10. Aleix Espargaro (Spain) Power Electronics Aspar 1:49.348
More to follow