Many to the original canon, from re-appropriated lines, to Watson limping, to one or two references to cocaine use.
Watson: You realize what you're drinking is intended for eye surgery?
[from the second film] ...you're drinking embalming fluid?!
Mary quotes Watson as saying that his friendship with Holmes is "worth the wounds". Watson, in his narration of "The Adventure of the Three Garridebs", expresses a similar sentiment in similar words: "It was worth a wound - it was worth many wounds - to see [how much Holmes cares about him]".
Mycroft Holmes is also mentioned. In the second film he's an actual participating character.
When Mycroft is introduced he and Sherlock take turns Sherlock Scanning each other, which Mycroft ultimately wins, a nod to the fact that Mycroft is actually smarter than Sherlock.
Near the end of the first movie, Mary Morstan sees all of Watson's journals about his and Sherlock's adventures, and says she'd like to read them. This, of course, is a reference to how almost all the Sherlock Holmes stories are told by Watson.
Similarly, the second movie is bookended by scenes of Watson frantically typing up the stories. It's implied that Holmes' death pushed him into it; this is in accordance with the real-life publication dates of the first two volumes of Holmes stories, which were all published between 1891 and 1893, when Watson would have believed his friend was dead.
Irene's photo from "A Scandal in Bohemia", which Holmes asked the King of Bohemia to give him as a souvenir, is seen.
Holmes shooting the initials "V.R." into the wall, mentioned in "The Musgrave Ritual" as his idea of patriotic decorating.
The talk about how you could tell that a drinker owned a watch is from The Sign of Four, although it was a different context.
Irene cuts Holmes off before he can finish mentioning the details of "A Scandal in Bohemia".
In the closing credits, we learn that the boxer that Holmes faces in the pit is a man named McMurdo. In The Sign of the Four, McMurdo was a bodyguard hired by one of that story's supporting characters, who decided to let Holmes into said character's house when he recognized him as one of his old adversaries from his prizefighting days.
The line "It does make a considerable difference to me having someone with me on whom I can thoroughly rely", which was given prominence in most of the trailers, is lifted wholesale from "The Boscombe Valley Mystery". The line, "There's nothing more deceptive than an obvious fact," is from the same story.
"Data, data, data! I can't make bricks without clay!" is similarly filched from "The Copper Beeches".
In a similar vein, "My mind rebels at stagnation. Give me problems, give me work..." is from The Sign of Four.
And "You have the grand gift of silence, Watson. It makes you quite invaluable as a companion." from "The Man with the Twisted Lip". Someone had fun.
Watson's injury was a Shout-Out to Doyle's indecision about whether the bullet hit the shoulder or the leg. Fanon has different theories as to which, with both being a popular choice.
The comments Watson makes about Scotland Yard's rugby match are a Shout-Out to A Study In Scarlet, where Holmes compares the officers to a herd of bison.
Holmes's reference to Don Giovanni is another reference to Fanon. Irene Adler was a contralto opera singer in "A Scandal in Bohemia", and some fans believe that Holmes frequented the opera in hopes of seeing her.
Holmes' use of disguise to sneak a peek at Irene's employer.
Conan Doyle described Holmes' fits of melancholy and many have speculated that Holmes was bipolar. Holmes seemed a little unbalanced at the beginning — "Is it November?" — although this was mostly played for laughs.
"Sherlock Holmes Aides Police" is a shout-out to the several instances in the books where Lestrade gets the credit for a crime Holmes solves.
Watson's bulldog is canonical but little-known, being mentioned once in the first chapter of the first Sherlock Holmes story, A Study in Scarlet, and then never again (among those fans who remember the dog at all, it's often assumed that Watson sold it or gave it away shortly after moving in with Holmes). The running joke about Holmes testing anaesthetics on the dog is also inspired by a scene in A Study in Scarlet, although that involved a different dog, an aged and infirm terrier that was waiting to be put out of its misery when Holmes appropriated it to test a substance he suspected of being poisonous.
Holmes looking up at the ceiling or absentmindedly plucking on the violin when deep in thought.
The film incorporates Holmes' line about keeping Watson's checkbook locked in his desk and adopts the interpretation drawn from that and other hints that Watson had a weakness for gambling.
A Game of Shadows unsurprisingly has quite a few to "The Final Problem." In particular, several lines of dialogue are lifted directly from the story:
Moriarty: Rest assured. If you attempt to bring destruction down upon me, I shall do the same to you. My respect for you, Mr. Holmes, is the only reason you're still alive.
Holmes: You've paid me several compliments. Let me pay you one in return, when I say that if I were assured of the former eventuality - I would cheerfully accept the latter.
And, later on:
Holmes: No possible solution could be more congenial to me than this.
Moriarty's monograph Dynamics of an Asteroid (from "The Valley of Fear," natch) makes a couple of prominent appearances in Game of Shadows.
His asking Holmes whether he has actually read the book may be a subtle one as well — in the stories, the monograph was so advanced that no scientist could understand it well enough to critique it. Especially considering that in "A Study in Scarlet," Watson makes a length of Holmes's strengths and weaknesses, noting that the detective knows absolutely nothing about astronomy.
The binomial theorem features on Moriarty's blackboard and as part of the key to the code in his notebook. In the books, his treatise on the binomial theorem, written at the age of 21, was the thing that won him his professor's chair.
There is a train chase in the original story, though it's SIGNIFICANTLY more...subdued.
The postcard from Holmes to Watson outside the weapons factory, "Come at once if convenient" and subsequently "If inconvenient, come all the same" is from the original Doyle story The Adventure of the Creeping Man.
Some street urchins are present at Holmes' funeral at the end of the second movie. The Baker Street Irregulars, perhaps?
The Diogenes Club, which Mycroft co-founded in the original canon, is mentioned when Watson deduces that, since Mycroft is not dining there, something serious must have his attention.
The description of Holmes near the end of the second film, "He played the game for the game's own sake", is what Holmes says of himself in "The Bruce-Partington Plans" when it's suggested he might get a big reward for solving the mystery.
When Watson comes to find Holmes after his boxing match, Holmes' experiment with his violin and a jar full of flies is a recreation of a similar scene in the Basil Rathbone film The Adventures of Sherlock Holmes.
Take a close look at Moriarty's little red notebook. Then go watch the Granada TV version of "The Final Problem" (with Jeremy Brett) - specifically, the scene where Moriarty visits Holmes in Baker Street and consults his notebook about when Holmes first crossed his path.
When Holmes is giving a "speech" at Watson's non-existent stag party, he is carefully eying a target moving through the club's crowd, and rather absent-mindedly refers to Watson as John "Hamish" Watson, referencing some confusion in one of the original stories when Watson's wife refers to him as "James" ("Hamish" being the Gaelic equivalent) and not "John".
The scene in the Temple of the Four Orders in the first movie, where Holmes analyzes Sir Thomas Rotheram's facial features to deduce that he's Lord Blackwood's father, seems deliberately reminiscent of a similar scene in The Hound Of The Baskervilles, where Holmes analyzes the facial features of a Baskerville family portrait to deduce that Jack Stapleton and Henry Baskerville are cousins.