Napoleon gained control of the farm due to many reasons. Some of these were that Napoleon had an army of dogs with him. He used Squealer as a spin-doctor and propagandist while using Snowball as a scapegoat.
The main factor how Napoleon gained control of the farm is because Napoleon had an army of dogs that helped him chase Snowball away. The army of dogs were from Bluebell and Jessie who had given birth to 9 puppies. Napoleon took these puppies away from their mothers and had trained them.
"They were the puppies whom Napoleon had taken away from their mothers and
reared them privately."
As soon as Napoleon gave the high-pitched whimper, all of the 9 dogs would come running in to the barn and chased Snowball out of the farm.
"...and nine enormous dogs wearing brass-studded collars came bounding into the
barn. They dashed straight for Snowball..."
In addition to Napoleon having an army of dogs, Napoleon also had Squealer who acted as a spin-doctor and a propagandist.
With Squealer, Napoleon was able to do his own things that benefited him while Squealer was telling everyone how Napoleon was always right and Snowball was a criminal. As a result, Napoleon gained the respect of all the animals.
"Suppose you had decided to follow Snowball, with his moonshine of windmills.
Snowball, who, as we now know, was no better than a criminal?"
Although the animals argued back most of the time, Squealer continued to make the animals trust Napoleon. Squealer managed to influence the animals into believing him and into thinking twice before overthrowing Napoleon.
"Surely, comrades, you do not want Jones back?"
Furthermore, Napoleon used the sheep to distract the other animals when they were listening to Snowball's speech so they would not be influenced by his...