Focus on keeping your horse between the hand and leg- make sure your horse comfortable is flatting in a frame. To gain control, you need to practice a lot of flat work. In flat work, consistently work your horse in a frame, keeping him attentively between the hand and the leg and ensuring there is a good connection.
Start in walk, by asking your horse to move forward into an extended walk and then back down into a collected walk, and practice a few walk to halt transitions. Then, move into the trot and do the same; move between extended, medium and working trot, and you can throw in some downward transitions to walk and halt. By making sure your horse is listening in the walk and trot, your job in the canter should be a little easier. In the canter, practice balanced canter and circles where your horse must be engaged and focused- don't just canter around and let him get bored. Constantly ask your horse questions, and keep them engaged. Practice opening and closing the canter from extended center, to working canter and collected canter, and practice some walk- canter and trot canter transitions.
Don't get aggressive and rough with your hands if he gets out of control- use your voice with "woah" commands , and do frequent gentle half halts or a small inside circle.
If your horse still remains out of control, ask your trainer about riding him or consider a slightly stronger bit.
Keep contact on the reins, half halt if your horse tries to speed up, or, if your horse sometimes disobeys commands and tries to speed up, pull your inside rein and move his nose toward the rail. Then he should slow down.