The appy I had as a project horse last year was like that; he'd been gamed for years, and only had walk-RUN 'buttons', on him.
I would just do exercises that go from walk-trot-walk, trot-walk-halt, etc...if he breaks from the trot, then put him into a small circle while verbally asking him to Trot. When he is back in the trot, go back to the rail. Start out asking for one or two strides of a trot, and going from there. Even after alot of working, he may still want to go faster...it will likely be a long time struggle with him, just because of how much a barrel horse is asked only to run. Most riders don't make sure all of their gaits are solid, they just walk, and run unfortunately. Just keep working on it, and reward ever effort he gives you.
"The ideal horseman has the courage of a lion, the patience of a saint, and the hands of a woman..."