Bagnaia led for much of Sunday’s 22-lap grand prix in Qatar, but was overhauled by Gresini’s Di Giannantonio on the 19th tour.
Trying to get past him again, Bagnaia found himself sucked into Di Giannantonio’s slipstream and almost ran into the back of the Gresini Ducati into Turn 1 at the start of lap 20.
Bagnaia ran wide onto the run-off area and allowed Di Giannantonio to escape to a maiden win, while the factory Ducati rider extended his championship lead to 21 points in second after title rival Jorge Martin struggled to 10th with a tyre issue.
“It was very scary and the two laps after I was completely scared,” Bagnaia said. “I said to myself [after] ‘now I have to just finish the race without taking any risks’, because P2 was OK, honestly.
“But winning was meaning a lot, not only for the championship but also for me because after this period, winning a race was very important.
“But in any case, we showed an incredible pace and this was fantastic.”