really depends on the type of gallery you are using.
some of the galleries use mootools, and some of them use jquery.
If you are using a jquery gallery, it is most likely that your jquery script is using a different version.
if you are using a mootols gallery type, then you will need to configure your jquery script to use compatibility mode:
Using_jQuery_with_Other_Libraries
the issue being that both jquery and mootools create a $ function allowing you to reference elements by ID: $("elementID"). if using both libraries at the same time, only one can use the $ function.