Electrical synapses between neurons, also known as gap junctions, are direct cell membrane channels between adjacent neurons. Gap junctions play a role in the synchronization of neuronal network activity; however, their involvement in cognition has not been well characterized. Three-hour olfactory associative memory in Drosophila has two components: consolidated anesthesia-resistant memory (ARM) and labile anesthesia-sensitive memory (ASM). Here, we show that knockdown of the gap junction gene innexin5 (inx5) in mushroom body (MB) neurons disrupted ARM, while leaving ASM intact. Whole-mount brain immunohistochemistry indicated that INX5 protein was preferentially expressed in the somas, calyxes, and lobes regions of the MB neurons. Adult-stage-specific knockdown of inx5 in αβ neurons disrupted ARM, suggesting a specific requirement of INX5 in αβ neurons for ARM formation. Hyperpolarization of αβ neurons during memory retrieval by expressing an engineered halorhodopsin (eNpHR) also disrupted ARM. Administration of the gap junction blocker carbenoxolone (CBX) reduced the proportion of odor responsive αβ neurons to the training odor 3 hours after training. Finally, the α-branch-specific 3-hour ARM-specific memory trace was also diminished with CBX treatment and in inx5 knockdown flies. Altogether, our results suggest INX5 gap junction channels in αβ neurons for ARM retrieval and also provide a more detailed neuronal mechanism for consolidated memory in Drosophila.