Sensei.

Undoubtedly one of the most influential people in Gintoki's life, or perhaps the one person who "gave him" the opportunity at life at all, Yoshida Shouyou plays an important, yet mysterious role in Gintama. He is one of the main keys to Gintoki's past outside of his former comrades and took Gintoki under his wing at an early age to train him in both swordsmanship and the bushido.

One of the earliest scenes of young Gintoki feature him sitting amongst a pile of corpses and blood in the aftermath of a battlefield. Yoshida Shouyou went to seek out Gintoki in this area and upon finding him, tells him that people had mentioned a "corpse eating demon" who was present there. Even as a young boy, Gintoki appeared defiant and willing to put up a fight despite his hungry and weak body, but Shouyou-sensei approached him with nothing but tenderness and care. He seemed to be impressed with Gintoki's willpower to live, but at the same time was able to sense the burden of fear and hatred which he carried within him. As a gesture of kindess, Shouyou-sensei tossed Gintoki his very own sword and told him that he'd be willing to teach him how to use it properly if he came with him. However, though Shouyou-sensei physically handed a sword to Gintoki, what he was actually offering him was not a weapon--but a life-long lesson in what it meant to hold that weapon.

You no longer need that sword. A sword that's only swung in self defense, while fearing others, should be thrown away.
--Yoshida Shouyou, Episode 180
Following his encounter with Shouyou-sensei at the battlefield, we can assume that Gintoki took up classes with him and other students his age, two of whom we know as Takasugi and Katsura. Scenes of this group in the classroom showed most of the students listening intently, while Gintoki, apathetic as always, drooled and snored quietly in the back. All of Shouyou-sensei's students carry a green textbook, which both Takasugi and Zura still hold onto today, although Gintoki claims he spilled ramen on it and has long since thrown it away. Whether or not this is true or Gintoki is just trying to play cool by pretending to let go of silly sentimental things, it's most likely that this book is the textbook Shouyou-sensei used for his lessons during their youth. This isn't to say that Gintoki threw away the teachings of his mentor, but perhaps just holds them deep within his heart or doesn't feel he needs something physical to remember him by.

Though we can't really be certain of anything, it's likely that Shouyou-sensei has long passed away--since Takasugi claims that the world "took their teacher's life" from them and scenes of Gintoki yelling his teacher's name in front of a burning school building have appeared in the spoof trailer, Shiroyasha Koutan. However, the teachings which Shouyou-sensei had laid before him are instilled within Gintoki's heart. From the very beginning of the series, one of the things that Gintoki boasts on and off is that he wants to fight to protect his soul and the beliefs of his customers. This is a lesson her learned from none other than Yoshida Shouyou, who saw the sword not as a symbol of violence or a means of self defense, but something that helps to protect who you are inside.

From now on, you will swing that sword. Not to cut down your enemies. Not to cut away your weaknesses and protect yourself. But to protect your very soul.
--Yoshida Shouyou, Episode 180
One of Gintoki's greatest regrets is that in the past he has failed to protect what he wanted to: this most likely partially relates to his relationship with Shouyou-sensei. During the Jiraia Arc, in which Tsukuyo fights and then comes to terms with her master, she states that while it is the master's duty to shoulder the student along with their pain, it is the student's duty to grow strong enough to shoulder the master. As Gintoki and Zenzo watch on as Tsukuyo spends time with Jiraia during his last few breaths, the two of them have a short conversation which reveals a little bit more about Gintoki's relationship with Shouyou.
Zenzo: A student's duty is to grow strong enough to shoulder the master, huh? I was always relying on my old man, so I was never able to do that.
Gintoki: ...Same here.
Aside from wanting to rescue Tsukuyo and all those troubled by Jiraia's bad deeds, Gintoki openly states that he wants to kill him "in honor of his teacher". Out of the respect that Gintoki holds for Shouyou-sensei, he claims that Jiraia is simply disgracing the honor of those we call "a teacher" by being unable to carry the burdens of his own student. The anger and frustrations that Gintoki carries about his former teacher comes flooding back to him, causing him to fly off the handle and send him into a rage unlike one readers have ever seen before. His inability to control his emotions is as horrifying as it is touching, and it truly demonstrates the amount of respect and admiration that Gintoki holds for Shouyou-sensei.
You parade around with the name "teacher" and betray your own student. Since she was a kid, she believed in you, chased after you, wanted to be you... and you treat her as bait. You can't call yourself a teacher after what you've done. You can't have a student after what you've done. Disappear!
--Sakata Gintoki, Chapter 259
Before his passing, Shouyou-sensei was able to give and teach a lot to Gintoki: not only did he rescue him as a child, but he also gave him the opportunity to make friends among his classmates and learn the way of the sword. Shouyou-sensei granted Gintoki the life that he has today, and though Gintoki would probably never openly state his thankfulness out loud, he pretty much "lives out" his thanks by living the morals and code taught to him by his teacher. Gintoki mentions in passing that he never had parents or a loving family as a child, so it's possible that he looked to Shouyou not only as a teacher, but perhaps as something of a father figure as well. One of Gintoki's greatest regrets may in fact be that he could never repay his teacher for what he did for him, or perhaps that he failed to protect and "shoulder his master" entirely, but he repays the debt he owes to Shouyou-sensei by the odd jobs he does around town and helping people protect what they believe in.