British gain control over the Suez Canal in 2 main ways.They are:
First,British took partial control over the canal in 1875.This happened because the ruler of Egypt was in serious financial difficulties.He owned a large bloc of shares in the canal and sold them off to take care of his debt.This gave the British partial control of the canal, but they didn’t have the complete control of it because most of the shares were owned by the French.
Second,in 1882,British essentially took control over Egypt as a whole.This time they came at the request of the ruler of Egypt(the son of the ruler who sold the shares).The ruler of Egypt was faced with rebellions within his country.He asked the British to come in and give military help in restricting the rebellions.Once there,the British stayed and occupied Egypt.This gave them control over the canal.