It depends on the motifs and the reason why you wish to associate them. Protein motifs? Regulatory DNA motifs?
One approach would to perform some GO term enrichment analysis such as BINGO ( this and other tools here) on the associated genes, taking care ensure the enriched terms are appropriate
Alternatively why not link to known Interpro motifs? If applicable this may be much cleaner. Use the precalculated data from model organisms or use Interproscan if not known.
If you are talking about DNA motifs, take a look at GOMO. It's part of the MEME Suite. Your motifs have to be in MEME format.
"GOMO will use the DNA binding motifs to find putative target genes and analyze their associated GO terms. A list of significant GO terms that can be linked to the given motifs will be produced."