The 24-year-old made his break with approximately seven kilometres remaining of the gruelling 254.8-km ride and held on for a maiden rainbow jersey, despite a keen fight from the chasing pack in Spain.
Simon Gerrans of Australia clinched the silver medal, while Spain's Alejandro Valverde rounded off the top three to take bronze.
Kwiatkowski made an initial move on the final climb of the race when he hauled in a breakaway group consisting of Cyril Gautier (France), Michael Valgren Andersen (Denmark), Vasil Kiryienka (Belarus) and Alessandro De Marchi (Italy).
The Pole led another charge with De Marchi and Andersen, but he soon dropped the duo and made a solo break.
Kwiatkowski's break had caught the peloton off guard, but Gerrans and Valverde led a bunch of riders in attempting to narrow the gap.
The narrow eight-second gap had been reduced as the race reached the final kilometres, but Kwiatkowski had done enough to relax over the line and celebrate becoming the first Polish winner of the event.
"I was feeling great on the last lap and I'm really grateful to my team-mates and all their work," he told reporters.
"I was just going for the win I was trying to take risks because some were calculating and waiting the final climb."
Gerrans became the first Australian medalist since Matthew Goss claimed silver in 2011, while Valverde continued to be the perennial nearly man as he claimed a sixth medal without winning the race.