I just assume you are a very young person to ask this question. I will tell you just a little information so that you are not overwhelmed. Horses are expensive. It really depends on where you live, if you live in the country where you can keep one. If your parents would be willing to pay all the expenses involved. They need lots of things. Food and water for starters then every 8 weeks they need their feet trimmed by a farrier. Then there is the yearly vet (doctor) bills for shots and medication.
Now about galloping. Horses naturally know how to do this. A slower version is called cantering. You may want to start by asking your parents to buy you some books so that you can research about horses by reading. There are lots of good books out there.
As far as cost. They can start out cheap and go into the millions of dollars depending on what horse you buy. Most average at a thousand dollars or more. You get what you pay for. If you buy a horse that has little training it will be cheap but may be dangerous since you will get hurt.
I have had horses since I was around 4 or 5 years old and it has been a wonderful life. Yet it is time consuming, a LOT of hard work and costly. I wish you luck and hope you someday get your wish of owning your own horse. Oh and you also can lease a horse in some places around the country. It means that you can rent a horse and you pay monthly whether you use this horse or not. Please get lessons on how to work with and ride a horse before buying.
Good luck to you.