Red Bull's three-time champion Max Verstappen had to settle for third and the second row in the tense wet-dry qualifying
The 24-year-old Briton, who is 84 points behind Verstappen in this year's title race, clocked a best lap in one minute and 15.227 seconds to outpace the Australian by 0.022 seconds.
Verstappen was three-hundredths of a second adrift in third ahead of Ferrari's Carlos Sainz, who leaves the team at the end of the year, and seven-time champion Lewis Hamilton of Mercedes, who will replace him.
Charles Leclerc, in the second Ferrari, was sixth ahead of two-time champion Fernando Alonso and his Aston Martin team-mate Lance Stroll and the RBs of Daniel Ricciardo and Yuki Tsunoda, who had survived a high-speed crash earlier in Q3.
It was Norris' second pole in four races and the third of his burgeoning career as he gains front-running experience in his bid to challenge Verstappen who, on Sunday bids to complete a hat-trick of Hungarian wins.
"I'm very happy with that and it wasn't easy at all in difficult conditions so ending up on top is the best for us all and a great result for the team," said Norris.
"We have come into this weekend confident we can do a good job so to be on pole is sweet."
"It's the first 1-2 for McLaren for a long time and an amazing result for us," said Piastri. "I had a tricky day yesterday so for me it is nice to bounce back."
Verstappen said: "I tried. We have been behind the whole weekend and I tried to make it as close as possible, but it wasn't enough. I would have liked a bit more grip…"
After Friday's sweltering conditions for practice, qualifying began in much cooler weather with temperatures and light rain falling.
The McLaren pair were first out on soft slick tyres along with Kevin Magnussen in his Haas.
Under pressure Perez
George Russell was also struggling before the session was red-flagged when Sergio Perez smacked the wall at Turn Eight, having lost control and made a sideways slide into the barriers in the second Red Bull.
For the under-pressure Mexican driver, it was another Q1 setback in a sequence of bad qualifying outings and came just seconds after Russell had saved his car from sliding off at the same place as the rain intensified.
After a 12-minute break, the action resumed with Perez hanging on in ninth from his earlier efforts, before he suffered his fourth Q1 exit in six outings as he embarked on two racing weekends that many observers believe offer him a last chance to save his seat at Red Bull.
In a frantic finale to Q1, on a damp circuit, Russell managed to jump from 14th to 10th but it was not enough as others improved to leave him 17th and out, taking an early exit for the second year running at the Hungaroring along with Perez, 16th, Zhou Guanyu of Sauber and the two Alpines of Esteban Ocon and Pierre Gasly who stayed in the pits.
Unexpectedly, Daniel Ricciardo was fastest for RB in the changing conditions while Norris was only 13th.
"I'm sorry about this session guys," said Russell, who had asked for more fuel to prolong his running to three laps. "That one is on me."
The Q2 segment started with Sainz on top, until Hamilton and then Verstappen took over, the Dutchman in 1:15.770, nine-tenths faster than Hamilton's pole in 2023. Piastri went second only 0.015 off the pace.
On his second run, Norris took command in 1:15.540 while Hamilton struggled to survive in 10th and Haas' Nico Hulkenberg, Valtteri Bottas of Sauber, Williams' Alex Albon, Sargeant and Magnussen missed the cut to the top-ten shootout.
All this left Norris and Verstappen to scrap for pole, as rain was forecast, and the Dutchman led them out to clock 1:15.555 before Norris cut that time by 0.328 with his lap in 1:15.227. It was provisional pole, as rain began to fall.
The world champion pushed to improve but stayed third as Yuki Tsunoda crashed at Turn Five in his RB to prompt a red-flag stoppage. It was a big accident, but the Japanese driver was unhurt.
Two minutes and 13 seconds remained, enough time for one more flying run as the marshals cleared the debris. In the event, as it drizzled, only Ricciardo improved his time to take ninth from his team-mate.