Brazilian defender Marcao scored the opening goal for the Turkish team in the 28th minute with a diving header from a corner.
Pedri equalized for Barcelona with a fine individual goal, receiving a pass from Ferran Torres and skillfully leaving two defenders on the floor before tucking home from close range.
Pierre-Emerick Aubameyang headed against the post before the break, and the former Arsenal striker put Barcelona ahead three minutes into the second half with a close-range header after Galatasaray goalkeeper Inaki Pena, who is on loan from the Spanish club, made two magnificent saves.
Barcelona ran down the clock, infuriating the home crowd, who began throwing bottles and plastic cups onto the field, and the game was briefly halted by the referee.
Mirko Ivanic gave the Serbians hope early in the first half, but the Scottish side held on and Ryan Kent equalized after the break. Red Star’s late goal by El Fardou Ben was too little, too late.