Your battery ran dry, sorry to hear that. :(
But fixing it is no easy task, you would have to get a replacement battery (which isn't easily obtained, nor is it cheap), take apart your game, and replace the battery manually. It won't affect things in the game too badly, you just can't do time based events. If your concerned about your game getting old, and possibly losing your save data next (which is not battery based, but in a memory chip), then I'd suggest moving your pokemon to a DS game, which uses the DS's internal clock rather than an internal cartridge battery.