The original cartoon series never provided any origin for Inspector Gadget, and it implied his first name and last name were both Gadget (and his niece Penny usually called him "Uncle Gadget").
According to the movie, John was a security guard who was almost killed trying to stop Doctor Claw from stealing some valuable equipment for the "Gadget Program". However, he was rebuilt using the same equipment he had tried to protect and thus became the detective known as "Inspector Gadget".
Inspector Gadget's greatest superpower was never his various cybernetic implants or even his genius niece Penny; it was his incredible good luck (represented here by "probability manipulation" even though it always occurred unconsciously), far beyond the norm for other animated characters of his type.
Inspector Gadget was created for the 1983 cartoon by the same name. He was voiced by Don Adams (who also played Maxwell Smart) although he was voiced in the pilot by Gary Owens doing an impression of a British accent. After continuing to be popular, he was adapted into a Live-action feature length Disney Movie played by Matthew Broderick which tried to imitate the cartoon's style, though many fans believed it was darker than their favorite cartoon. Later, there was a direct to video sequel. There have been rumors of a third movie, but no evidence to support these claims.
He made his first Comic book appearance in Look-in where his cartoon ran in comic strip form.