Rabottini pretty much led the 169-kilometre stage from Burso Arsizio from start to finish, crossing four summits in the lead and even crashing once before being caught inside the final 500 metres by Katusha climber Rodriguez.
But in spectacular scenes on the waterlogged Cat.2 climb, Rabottini thrilled the home crowds by somehow summoning the strength to pip Rodriguez in the final sprint and take his first ever Grand Tour stage win.
Rodriguez took consolation in seizing back the maglia rosa from Canada's Ryder Hesjedal (Garmin-Barracuda), who finished 39 seconds back and now trails the Spaniard by 30 seconds in the general classification.
Another miserable day in north Italy started with 70 kilometres of racing across flat roads in the Brianza area culminating in an intermediate sprint at Lecco ahead of the first of four classified climbs.
Rabottini escaped from the peloton alongside Frenchman Guillaume Bonnafond (Ag2r-La Mondiale) 18 kilometres into the race, moments before news filtered through of the withdrawal of one of the pre-race favourites, Frank Schleck of Luxembourg.
The RadioShack Nissan rider called it a day owing to a shoulder injury sustained in a crash during stage 11 to Montecatini. Schleck will now take time off to recuperate before beginning his training ahead of July’s Tour de France.
Back on the road, Bonnafond took the points at the immediate sprint before handing over the baton to Rabottini, who would go on to stamp his authority over the stage.
Britain’s Mark Cavendish (Team Sky) led the peloton over the line in Lecco eight minutes down on the two escapees to consolidate his lead in the red jersey points classification.
Rabottini dropped Bonnafond straight away on the Cat.1 Valcava climb, which had an average gradient of 8.6% and ramps as high as 17%.
Behind, a chasing group of 11 riders formed around Italy’s Damiano Cunego (Lampre). Rabottini crossed the summit with a five-minute lead over his pursuers, with the peloton rolling along another minute back.
Cunego attacked on the descent, forcing the chasing group to increase its tempo. Soon their advantage had ballooned over the peloton to almost five minutes – putting Cunego, the ‘Little Prince’, in virtual pink.
Riding with both verve and passion, Rabottini was giving nothing away to the chasing group until he hit the fourth climb of the day, the Cat.2 Culmine di San Pietro.
By now the group had been reduced to just five riders: stage 14 winner Andrey Amador (Movistar), Amets Txurruka (Euskaltel), Alberto Losada (Katusha), Stefano Pirazzi (Colnago) and that man Cunego.
But under pressure from the Liquigas team of Ivan Basso and the Astana team of Roman Kreuziger, the peloton was beginning to reel in all the men in front.
Rabottini’s advantage over the penultimate summit had been reduced to 2:45 over the Cunego group and 5:45 over the peloton.
Cunego threw caution into the wind and attacked once again on the final descent, the Italian almost coming off his bike on one of the many tight bends of the narrow, slippery and winding road.
His countryman, the lone leader Rabottini, did not fare better, and under pressure to maintain his lead, he crashed on a tight left-hand bend towards the end of the descent, still 17km from the finish.
With Cunego now just 2:10 back and the peloton inside five minutes, it looked like Rabottini’s luck was running out.
But somehow he found the strength to continue through the fog and rain.
Rabottini started the final climb with 2:30 over the chasing group, which had now reformed – and which soon shed a rapidly tiring Cunego.
Three times Pirazzi put in gutsy attacks, but on each occasion he was reeled back in before Losada finally distanced the persistent Italian.
Entering the final 2km, Losada had 1:15 to make up on the suffering Rabottini – but the race was coming back together just behind the Spaniard as the main group of race favourites began to sweep up the remnants of the chasing group.
Kreuziger put in a dig but his move merely acted as a springboard for defending champion Michele Scarponi to counter. Scarponi caught up with Lampre team-mate Cunego but then was surprised by Rodriguez, who jumped clear inside the final kilometre in pursuit of his own Katusha team-mate, Losada.
With 400m remaining, Rodriguez caught and passed Losada, leaving just one man out in front. The Spaniard drew level with a faltering Rabottini with 200m to go but could not have expected what followed.
Being caught so close to the line would have destroyed most riders, but Rabottini seemed like a man possessed as he mustered one final burst of acceleration.
Rabottini staggeringly managed to hold onto the wheel of Rodriguez before passing the Spanish stage 10 winner with an emotional last-ditch dig to take a dramatic win.
Losada crossed the line 23 seconds down in third, with Colombian youngster Sergio Henao of Team Sky leading Scarponi and Basso over the line four seconds later.
Hesjedal crossed the line in 12th place, 39 seconds down, to drop to second in the GC, 30 seconds behind Rodriguez.
Basso enters Monday's much-needed rest day third in the overall standings, 1:22 in arrears, while Henao moves into the white jersey as best young rider after Sky team-mate and compatriot Rigoberto Uran conceded 1:46 at the finish.
With Astana pair Paolo Tiralongo and Kreuziger lurking in fourth and fifth place just ahead of Scarponi, 1:36 down in sixth, the scene is set for a dramatic final week of racing through the Dolomites and on to Milan.
The Giro d’Italia continues on Tuesday with the 174km stage 16 from Limone sul Garda to Falzes/Pflazen.