The fast will break by water going down the throat whilst gargling, even by mistake. This is important to remember whilst doing Wudhū or Ghusl. Gargle lightly. One Hadīth says:
وبالغ فى المضمضة الا ان تكون صائما
However, according to Imām Shāfi’ee’s R.A research, the fast will not break by such mistakes.
ذكره ابن العربى فى عارضة الاحوذى ص 189 / 2
Extracted from A Gift for Ramadhan, Page 54.