Former Vuelta a Espana champion Yates, 28, finished 58 seconds ahead of Spaniard Pello Bilbao and Russian Aleksandr Vlasov in third.
Team Bahrain's Bilbao edged Russian Aleksandr Vlasov of Astana with Yates, riding for Bike Exchange, third in the 'queen stage' of this year's race from Naturno to Pieve di Bono in northern Italy.
Hindley's Dutch teammate Wilco Kelderman struggled on the final two climbs but took the overall leader's pink jersey three days before the race finishes in Milan.
Tour de France 2019: Britain's Simon Yates wins stage 12 as Geraint Thomas, Julian Alaphilippe finish together
Simon Yates is over an hour adrift in the overall standings, but punched the air in joy after outwitting his rivals to add this Tour de France stage to victories in the Vuelta and Giro