Tripod gait is a stable gait. Moreover, it is a statically stable gait, meaning that if you lock the joints with 3 legs down and turn the power off, the robot will not topple. This implies that you don't need to dynamically balance the robot while walking.
The reason when a legged robot falls down is that its center of gravity does not fall on its support polygon (in tripod gait case, it is a triangle with each corner on one leg that's touching the ground). So what you should do is to measure the center of gravity and guarantee that it never leaves the support polygon of your robot while walking via adjusting your leg motion. Of course, this is all for a statically stable gait. Dynamically stable gaits allow the center of gravity to leave the support polygon in a controlled manner. But as I said, the tripod gait is statically stable.
I'm assuming that you are using naked DC motors without encoders or gear trains. There are two issues about this:
- First, make sure that you are getting enough total torque at each leg triplet that lift the robot. It may be the case that the DC motors cannot lift the robot on their own without a gear train.
- Second, errors tend to grow without bound when performing such a task, angular position errors being one example. This is simply due to noise and imperfect modeling of the motor. So in a sense, DC motors are not actually "controlled", you just apply an input while not knowing what the output is. You must apply closed loop control, which is done via getting feedback from an encoder. Then, you can sense what the angular position on your motor is, determine your error, and apply an input to correct that error.
Both of these problems are addressed in a servomotor, which is basically a DC motor, a gear train to increase torque and reduce angular velocity, and an encoder. I very much suggest using servos for your leg joints.