Extract the DNA from the gel using a clean-up kit and store in the -20*C freezer. You could try freezing the gel slices, but I've never tried it. You don't want the agarose to dry out so make sure that you put them in sealed tubes.
The best way to store DNA from excised gel after following a gel purification is: keep at -20 degree Celsius.
If you meant, you want to keep the DNA bound with the gel itself, you can keep the gel for 1/2 days in 1XTAE buffer or the gel running buffer you have used for electrophoresis, at 4 degree Celsius. Best wishes :)
Hi Emmanuel, If you are talking about Agarose gel, cut out the slice of agarose containing the DNA fragment of interest, and store it at -20 degrees or even 4 degrees in an Eppendorf tube very well sealed with Parafilm w/o buffers, as Katie suggested. I usually do it but i have always used it after a couple of days and i cannot guarantee it works for two weeks. Extracting the DNA is the only safe solution for two weeks.