The story is based on the 1988 Batman Comics storyline "A Death in the Family," where readers voted via a 1-900 number to either save or kill off the second Robin, Jason Todd. Over 10,000 votes were cast and with only a 72-vote majority, the decision was made to kill him. Todd was later brought back in 2005 as part of the 2005 "Under the Hood" storyline.
In every flashback showing Batman, the costume has minor differences (like the yellow chest symbol and older utility belt style), which is consistent with the fact that Batman does update his equipment and costume as he regularly fights for justice.
The Robin costume that Jason was in when he was killed in the film was modeled after the second Robin costume that Tim Drake wore in the comics. The earlier costume he was seen wearing in one of the flashbacks was the one he wore in the comics.
This is the first time Jason Todd has appeared by name outside of the comic books. However, he has been mentioned by name twice before-- first in the second episode of the short-lived Birds of Prey television series, "Slick," and again in an episode the Teen Titans (2003) animated series. Also, Tim Drake from The New Batman Adventures (1997) is depicted as a hybrid of these two characters' comic versions, with a background almost identical to the Post-Crisis Jason's, as well as a similar fate at the hands of The Joker.
In the original comic book storyline, several references were made to other superheroes during the fight, with Amazo based on the abilities he copied. Additionally, a few former deceased superheroes made a minor appearance to talk about their past experience with death, such as Superman. In the film, all references to these non-Batman characters were omitted.
The trivia items below may give away important plot points.
In the comics it was Superboy Prime's altering of reality that enabled for Jason Todd's resurrection by Ra's al-Ghul's Lazarus Pit, instead of the Lazarus Pit by itself. However, the Lazarus Pit by itself was used as the plot element for his resurrection in the film to keep things simple.