you guys! do you even have a silver soul!?Gintama is a manga created by Sorachi Hideaki, currently serialized in Shueisha's Weekly Shounen Jump. Plot-wise it's a bit harder to pinpoint exactly as Gintama is rather episodic in nature, but to keep it general it follows the life of a naturally-permed samurai named Sakata Gintoki during Japan's Edo Period. Gintoki lives in an era where aliens called the Amanto have taken control of the Shogunate and samurai have been rendered useless due to an anti-katana law enforced by the Amanto. In order to pay the rent and keep himself occupied, Gintoki runs the Yorozuya with companions Shinpachi and Kagura, where the three work as freelancers and take almost any job for any price (and almost always costing them their dignity). Perhaps to summarize it a little bit better, Sorachi explained the history behind Gintama in Chapter 36 of the manga:
20 years ago, the Amanto came to earth. The frightened samurai valiantly fought back, but they got their asses kicked. Incidentally, around this time, Gin-san was a bald little baby. After that, the frightened Bakufu decided to close the country off. The Amanto went ahead and built their own terminal, so that they could come anytime they wanted, and also in large numbers. At this point in history, samurai were all over the place, rampaging over the country while they tracked down and killed Amanto. Around this time, Gin-san finally grew some hair (down there).
Soon, the Amanto slid themselves into the Bakufu. The samurai still tried their best. At this time, Gin-san was out and about, living an alternative lifestyle than a normal child. Hey, no, wait, I didn't mean it that way! Soon, utilizing their control over the Bakufu, the Amanto put out an anti-katana law, so that they could easily crush the rebel samurai. The ever-weakening force of the samurai was now barely noticeable, and those that survived still tried their best. Okay. This is the story of the samurai from about a decade earlier. In short, it was a losing battle. Gin-san and his group eventually gave up and attempted to live normal lives, as you can see now.
Gintama, Vol. 5 Ch. 36 (translated by Maximum7)
So where exactly does Hijikata play a role in this story? He is the vice-commander of the Shinsengumi, the "police force" of the Edo period that help to keep the peace and preserve the shogunate system. Though they're not exactly the focus of the manga, Sorachi's love for the real-life Shinsengumi shows in the chapters in which he elaborates upon their exploits and even dedicates a few of Gintama's arcs to their story. (Sorachi admits to being especially fond of the real-life Hijikata Toshizo-- he was even originally meant to be Gintama's main character!)
All that being said, Gintama runs itself primarily by parodying other anime/manga series, along with video games, pop culture, historical references, or even mocking its own inadequacies. It's probably better known for it's gags and gimmicks more than it is alien invaders, furiously poking fun at other Jump series and throwing in a bathroom joke when all else fails. Arcs in Gintama are short and concise (the shortest one in the anime lasting a whopping two episodes), but because of this, perhaps even more powerful than those that run for an entire season. Bringing all this to attention may make Gintama seem to lack amazingly in plot, but fans would beg to differ as though it is episodic, every short story teaches valuable lessons: everything from the importance of friendship and family, to the dilemma of taking a dump while handcuffed to your worst enemy.