This manga series is amazing, mostly because it has so many levels. It's an entertaining read to begin with, because it has some Shonen-style action sequences and lots of wacky humor. Sometimes it's a little sophomric, but most of the humor comes from pure randomness. Even the premise is sort of random. It's set in an alternate reality Japan, where instead of just foreigners breaking in at the end of the country's long isolation, it's aliens! So we have samurai vs. alien battles, space-drug trafficking, Robots at a festival, and many more history/future crossovers (though not all in the first volume).
Though you probably shouldn't study Japanese history just to read a silly manga like this, knowing about it will help you appreciate some of the stories more. For example, in a famous incident, my favorite Japanese army (the Shinsengumi) attacked a meeting of radical samurai who were planning on burning down the capital city. In real life this meeting was at an inn in Kyoto. But Gin Tama's Shinsengumi burst in on a meeting of bomb-slinging terrorists at a high-rise hotel. The revamped historical events are entertaining for those who know about them. But history isn't even the deepest layer of this manga. There are some serious stories beneath all the craziness.
The hero of this series - Gintoki - is a joker on the outside, but inside he has the unflinching soul of a true samurai. The whole manga is somewhat the same. The story isn't always a joke: every chapter has some sweet or serious moments in it, sometimes enough to make me cry (not that that's saying much). There's a bit of a commentary on the time period in real history, the way Samurai and others adapted to changing times. Some former samurai become thugs, some become policemen; some switch occupaitons entirely. Some modernize along with their country, some try to change it back to the way it was, and some, like Gintoki, just sort of keep doing what they're doing and somehow get along.
In conclusion, Gintama is AWESOME, with a historical commentary, lots of humor and wackiness, and a few sweet life lessons. At least that's how I see it.