The Tokugawa Family were the rulers of Japan whose members were not only part of the Bakufu but also earning the title of Shogun. In the Gintama Universe, some of the family members' actions greatly influenced many of the characters in the series.
In 1603, Japan was permanently reunited by Tokugawa Ieyasu after a civil war between him and his rivals to the Shogun position three years before in the Battle of Sekigahara. Ieyasu became the first Tokugawa shogun, establishing a dynasty that will rule the country for about 260 years. It is under their rule that Japan closed its borders from the rest of the world and established an era of relative peace. Their era will show the near unchallenged power of the samurai as an upper class, who with no battles to fight, mostly became officials, opened dojos, developed some of Japan's culture and arts and formed a romanticized view of themselves that still influenced modern-day Japan. This is also when Edo became the new capital of the country, growing from a small village into a large city, lending its name to another nickname of the era, Edo Period.
In 1853, the arrival of U.S. Commodore Matthew Perry and his fleet of advanced ships sparked the beginning of the end of the Tokugawa Shogunate (Though it should be noted there were many factors that existed before his arrival that helped made the government's end more complete). When the conflicted government chose to open its borders to at first the US then to the European nations, it lead to both the public and some of the officials to view the government as weak, giving rise to anti- western or pro-western sentiment across the country. The splintering government devolved into a civil war between those who wanted the shogunate dissolved and the emperor reinstated as the leader of Japan and those that resisted, which includes the Tokugawa. With the anti-shogunate forces victorious, the last Tokugawa Shogun willingly abdicated, bringing an end to the Tokugawa's rule.
In the Gintama universe, the real life history mostly stays the same until the Bakumatsu period, in which instead of Perry's arrival, it is the arrival of aliens that forced the country to open its borders. This gave rise to a civil war that lasted ten years called the Joui Wars between the anti-shogunate/alien forces and pro-shogunate/alien forces, where the pro side won with the added help of some of the aliens. The story takes place ten years later.
The present shogun is Hitotsubashi Nobu Nobu, from the Hitotsubashi clan, a branch family of the Tokugawa (meaning he is related in some way to Shige Shige, Soyo, Mori Mori, and Sada Sada). He gained the position some time after the previous shogun, Shige Shige, resigned.
Shige Shige was the ruling shogun for most of the series until the Courtesan of a Nation Arc, where he resigned from his position to allow his corrupt uncle, Sada Sada, to be punished by the law. He was temporary reinstated for political reasons until a "suitable" replacement was found (ironically from the same group to whom Shige Shige was reinstated to suppress).
Tokugawa Soyo and Mori Mori are the younger siblings of Shige Shige.
Sada Sada was the previous shogun before Shige Shige and is the person most responsible for Japan opening its borders to the aliens and his involvement in the Joui Wars. He abdicated from his position and became his nephew's advisor, in some ways still being in charge of the government despite not holding the title.