Aleix Espargaro wins Catalunya MotoGP after horror crash delay
Espargaro's Aprilia teammate Maverick Vinales took second with Jorge Martin completing the podium at the Montmelo circuit.
As Espargaro celebrated a dream double at his home race after also winning Saturday's sprint, Bagnaia was receiving medical attention in a local hospital.
The Italian Ducati star had set off from pole. He avoided a multi-bike pile up at turn one but at the next corner lost control. Bagnaia as thrown violently into the air in front of the chasing pack.
Brad Binder's KTM then ran over Bagnaia's leg.
The runaway series leader was conscious, and taken away to the track's medical centre in an ambulance, with the crowd clapping him.
He was later transferred to the local hospital.
Espargaro's thoughts were with the stricken world champion.
"This win is for Pecco, luckily we've just heard it's nothing serious," he said.
Turning to his finest weekend in MotoGP he added: "I'm speechless.
"Thankfully nothing happened to us on the first lap.
"It was difficult in the wind. I thought I would not catch him (Vinales), but I waited and I did it."
Back on the track, the race restarted for 23 of the scheduled 24 laps.
Vinales led early on from Martin and Espargaro, born a couple of kilometres from the track.
Espargaro was soon into second, chasing his factory Aprilia teammate, with the second Aprilia of Miguel Oliveira racing third.
Binder had to pull out with tyre issues and the first thing the South African did was to go and check on Bagnaia's condition in the medical centre.
At the halfway stage Vinales had put daylight between himself and Espargaro as Martin took over third from Oliveira.
Espargaro threw everything at the leader setting up a thrilling conclusion to this 11th race of the season.
With four laps remaining Espargaro edged past his teammate and fellow Catalan.
In the world championship, Martin cut his deficit to Bagnaia to 50 points ahead of next weekend's San Marino MotoGP.