As an important artificial neural network, associative memory model can be employed to mimic human thinking and machine intelligence. In this paper, first, a multi-valued many-to-many Gaussian associative memory model (M3GAM) is proposed by introducing the Gaussian unidirectional associative memory model (GUAM) and Gaussian bidirectional associative memory model (GBAM) into Hattori {et al}'s multi-module associative memory model ((MMA)2). Second, the M3GAM's asymptotical stability is proved theoretically in both synchronous and asynchronous update modes, which ensures that the stored patterns become the M3GAM's stable points. Third, by substituting the general similarity metric for the negative squared Euclidean distance in M3GAM, the generalized multi-valued many-to-many Gaussian associative memory model (GM3GAM) is presented, which makes the M3GAM become its special case. Finally, we investigate the M3GAM's application in association-based image retrieval, and the computer simulation results verify the M3GAM's robust performance.