Originally Posted by Aurelius
The obvious solution is to downshift and just winch yourself up, but what happens then is that the front wheel won't stay down due to the extreme slope. Having that front wheel barely touching the ground also means you can't effectively steer while climbing. This happens even with my weight shifted forward over the handlebars, which sometimes results in a loss of traction at the rear.
Shown below is the dreaded Ant Hill trail at Santos, which is full of those kinds of climbs:
It is a balancing act between keeping enough weight on the back to maintain traction, enough on the front to maintain steering and moving back to unweight the front to clear obstacles and forward to get the rear over it. Stand up in a crouch to get your weight off the seat, basically stick the nose of the seat between your butt cheeks and keep your chest down over the bar. Now it is easy to move your weight front and back.
Another tip is to look past the obstacle you are about to hit. If you stay focused on it you are more likely to smack it with your front wheel or not be prepared for what is next if you do happen to clear it. Also try to pedal in circles in order to keep your torque constant so you don't have any sudden bursts of power that spin the rear or pop the front up. I avoid the granny gear too since it doesn't get you enough momentum. Finally practice riding super slow. Do track stands and just get comfortable staying clipped in when your forward progress stops or comes to a crawl. I used to bail when I would hit something that slowed me way down just based on survival instinct but once I got good at slow riding I was able to stay clipped in and clear stuff that I always used to have to walk.