There's two main types of grip: pinch grip and crushing grip. The exercises you use are different depending on what you need to develop. It will also help to know what you need to carry and for how long. That will determine if the problem is really technique related or strength related. There's a decent article with 7 grip exercises to get you started.
Developing Pinch Grip
- Dumbbell pinches
- Plate pinches
- Rice grabs
Developing Crushing Grip
- Deadlifts (I threw this in)
- Thick grip dumbbell holds
- Free hang holds
- Wrist roller
- Farmer's walks
How you program your grip strength can really depend on the improvements you need. In general, I would pick three of each of these exercises and do them once a week. Try to beat time, or increase weight with the same time. Again, it really depends on the load you have to carry and how long you have to carry it. I'd taper off the grip training at least 2-3 weeks before your obstacle course. You may do it 6 weeks out and work on carry technique for 3 weeks. You want your forearms pretty rested and ready to go when you finally race. Last thing is that you may reach a point where your grip seems to be getting weaker. If that's the case, skip grip training one week and see how that goes.