Bagnaia broke his left leg in a fast crash during first practice for the Czech GP in August and has been ruled out since.
Making his return in front of a small home crowd at Misano, Bagnaia qualified his Pramac Ducati sixth and fought his way through to second to claim a maiden podium finish in the premier class.
Still hobbling around on a crutch, Bagnaia admits it was only in the warm-up session on Sunday when he started to think he could have a decent result.
"Well, the most important thing was to restart from where we left off, because at Jerez we were very strong," Bagnaia said.
"Then also in Brno in the first session, but then I broke my leg and everything was very hard.
"It's almost been an incredible month because I worked very hard, I have to say thanks to all the people who have worked with me because we have done an incredible job to prepare for here.
"When I saw on the first day the leg was OK, I tried to push, the feeling on my bike was the same as Jerez, so I was very happy that everything was coming more easily than I was expecting.
"One week ago I was not expecting a podium or a second row in qualifying.
"I started to think of a good result in warm-up because I entered the track and 1m32.7s was coming to me very easily. So, I was not thinking of a podium, but to stay in the front group."
Bagnaia was on course for a podium at Jerez before his bike broke in the Andalusian GP, and has been one of the quickest Ducati riders this season when he wasn't injured.
This is a complete turnaround from his debut 2019 campaign, when he managed just one top five finish – with Bagnaia noting the turnaround coming in Thailand when he began to "accept" the Ducati riding style.
"In Thailand, I think I work a lot with my head, I started to accept the riding style of Ducati – it was completely [different] to mine," he responded when asked about the key to his transformation.
"But in my case, I tried in the first test this year to brake very hard, be very strong on braking.
"In Jerez we finished this transformation, because in Jerez 1 I was very strong on braking, but I finished the front tyre after 12 laps.
"Then the second Jerez race I was very strong all weekend. I think this weekend I rode very similar in respect to the Jerez race."