Michy Batshuayi scored the winning goal for the Black Eagles in the 67th minute at Vodafone Park in Istanbul.
Cyle Larin scored for Besiktas in minute 94 but that goal was disallowed by a video assistant referee (VAR) decision.
Besiktas got their first league win in three weeks and their third straight home win in the Super Lig.
They are in sixth place with 32 points in the Turkish Super Lig standings. Gaziantep FK are in the eighth spot with 31 points.
Friday's results:
Besiktas-Gaziantep FK: 1-0
Oznur Kablo Yeni Malatyaspor-Goztepe: 1-2
Kaynak: AA_ING