City fielded a strong side, including the likes of Yaya Toure, Carlos Tevez and Pablo Zabaleta, but came under sustained pressure from their Turkish opponents in the first half.
Sergio Aguero curled in the opener just before the break to change the course of the game and City captain Kompany provided the highlight of the night in the second period.
In an uncharacteristic sight, the defender sprinted forward to latch on to Adam Johnson's through-ball and chip the goalkeeper.
The sides were barely distinguishable as City chose to wear their new maroon away kit against Besiktas' all-red, but the Istanbul side made themselves known with a series of dangerous attacks.
Ugur Boral fired over after Mustafa Pektemek drew Costel Pantilimon off his line before the goalkeeper made a fine point-blank save from Manuel Fernandes.
But City led when Abdul Razak dummied Tevez's pass to set up Aguero, and Kompany's fine strike settled matters before the hour-mark.
Things got a little testy after Fernandes reacted to a poor challenge from City youngster George Evans, but the referee kept a lid on it despite retaliation from Alexander Kolarov.