The Australian Repsol Honda rider had to switch to his reserve bike after running off into the gravel at the track in north-eastern Spain, before clocking a time of one minute 48.451 seconds, 0.296 seconds quicker than team mate Dani Pedrosa.
American Yamaha rider Ben Spies was third fastest, 0.704 seconds behind Stoner, with champion Jorge Lorenzo, also of Yamaha, fourth with a deficit of 0.819.
"Everything has gone almost perfectly this weekend," said Stoner.
"I've been really happy from the start. The bike's been very close to what we want. We had to move a few things this afternoon because the temperature went up from this morning and yesterday, and it was our first chance to run in the hot conditions. We had to change to change the transfer and get everything a little bit more comfortable.
"But in general everything's been going really well. On old tyres, new tyres, the bike in general just seems to be flowing on this circuit."
Stoner set his eventual pole time on his spare bike after the minor crash.
"We had a little bit of a mishap on the soft tyre," he said. "We did the first lap and I was a little bit cautious in the first sector just to get the tyre warmed up.
"The next lap I went to push a little harder and I was a lot quicker and had a lot more grip than I had the laps before. When I went to get on the brakes I felt I had too much lean angle, and so I picked the bike up but I didn't really find anymore grip so I went off over the astroturf and just kept locking the front. So I had to lay it down before we hit the barriers.
"Unfortunately we couldn't get bike one started, but we came back, got bike two and went faster."
With 13 of 18 races completed, 2007 champion Stoner tops the standings with 259 points, Lorenzo has 224 and Italian Honda rider Andrea Dovizioso 185. Pedrosa, who has struggled with a series of collarbone injuries, is fourth on 150.