O'Connor (Dimension Data) snared the biggest win of his young career as he crossed the finish solo at the end of the 138.3km stage from Ora to Merano.
“Our Dimension Data team came to the Tour of the Alps with a stage win as goal, and I am happy we have achieved it," O'Connor said.
"After yesterday’s display, today I was focused on not missing a single opportunity for another good result, so I went on the wake of Pinot on the Passo Palade/Gampenpass.
"I like long climbs, today was a stage suited to me: last year I had been training in Val Gardena/Grödental, and it was an awesome experience. Clearly, I have a special feeling with Südtirol.”
The 22-year-old was five seconds ahead of Thibaut Pinot (Groupama-FDJ) who took the overall race lead. Domenico Pozzovivo (Bahrain-Merida) was third.
“Last year I lost the jersey and the race to Geraint Thomas for a matter of four seconds," Pinot said. "This time I have managed to have it back, and I don’t want to leave it anymore.
"Our attack was not planned today, but when I saw other strong guys like Fabio Aru trying to move, I went on as well.
"This is my racing style, and I believe races like the Tour of the Alps, with short and tough stages, are the best possible way to propose a great show like today’s.”
Pozzovivo and Miguel Angel Lopez (Astana) are second and third overall with Team Sky's Chris Froome holding down fourth at 16 seconds after he crossed the Stage 3 finish in sixth place.
Thursday's fourth and penultimate stage is a 134.3km route between Chiusa/Klausen and Lienz in Austria.