In "The Pineapple Incident", Marshall thinks Carl is a vampire. And for a brief second, Lily seems to agree. Lily's actress Alyson Hannigan has appeared as one of the main characters on Buffy the Vampire Slayer.
The McLaren's bartender gets the entire bar to shout "SWARLEY!" when Barney, er, Swarley walks in at the end of "Swarley", and then starts "Where Everybody Knows Your Name" (the Cheers opening theme) on a boombox. The closing credits use the same font as Cheers.
In "How Lily Stole Christmas," Ted substitutes Grinch for another word for the sake of his children, telling them: "Only I didn't say grinch." He then follows this up with: "Only I didn't say fudge," just to make the reference more obvious.
At the end of "The Bracket", Barney blogs about his experiences while theme music from Doogie Howser, M.D. plays.
In "Dowisetrepla", Ted describes the scene of Lily and Marshall fighting and finishes with putting his sunglasses on in a very David Caruso way.
"Lily left the lid off, then Marshall blew his."
The ending of the episode "The Naked Man" has Ted narrating to the style of Jim Gordon in the Dark Knight flick.
Barney had repeatedly tried hitting on her to no avail. Well in "Three Days of Snow" when he throws a party for a marching band, he asks "Is the flute section seeing anyone?"
In "Murtagh" after Barney accepts the challenge to do a list of crazy things in 24 hours to prove he's still young enough, he shouts "BARNEY STINSON" in the exact way that the original Leeroy Jenkins shouted his before recklessly charging into battle.
In "The Front Porch", when being questioned over breaking up Ted with numerous girlfriends, Lily gets her Colonel Jessup on and imitates the famous scene from A Few Good Men.
In "The Leap" we get the full story of the goat Lily rescued.
Marshall's description of "the best burger in New York" is a reference to Antonio Salieri's description of Mozart's music in Amadeus.
In "Unfinished", Marshall has an entire elaborate Star Wars analogy for GNB and Ted being like "the guy who built the Death Star". Not designing it with any ventilation shafts and clearly marking all the trash compactors on the detention level...
There are lots of references to Star Wars throughout the series as Ted, Marshall, and Barney are all fans. Barney has a life-sized model of an Imperial Stormtrooper in his apartment.
In "Baby Talk" when Lily wants to name her daughter Tara.
"Baby Talk" features one to the Pearl Jam song Jeremy in the form of Lily putting her hands up and shouting "JEREMY! NO!" before being covered in red paint.
From the episode "Blitzgiving", Ted mentioned he sang "Twist and shout" at the thanksgiving parade and telling Barney that he's not the Blitz, he's The Bueller
From the episode "Landmarks", Ted's mom briefly appears in Ted's dream holding a spinning top thats actually spinning in her hand. A nod to Inception
Lily gets the demon eyes and voice in "The Stinson Missile Crisis", and in ''The Pre-Nup Wil...ehrm, Lil hits the trifecta, clearly invoking Dark Willow as a Mama Bear.
When the gang attends an underground poker game in "46 Minutes", one of the Russians is seen eating Oreo cookies from a poker chip tray just like Teddy KGB from Rounders.
In the Slutty Pumpkin ReturnsThe Stinger shows Barney separating into his American side (represented as Barney dressed as Apollo Creed) and his Canadian side (represented by Barney dressed as a Dudley Do-Right) and the two begin to fight, directly ripping the fight from Superman III.
Ted says "Look, I came here to chew bubblegum and pack boxes and I'm all out of bubblegum" mirroring the iconic "kick ass and chew bubblegum" line from They Live!. He even wears shades like the plot device from that movie.
In "Rally", when Barney is drunk, one of his incomprehensible mumbles is "Aggle flaggle plabble wumby flappy", the entire dialogue of Trixie, the infant heroine of Mo Willems' children's book Knuffle Bunny.
In one episode, Marshall was drunkenly trying to use an ATM, and the ATM's screen turned into the original The Legend of Zelda briefly.
In one episode after Barney has accepted a challenge, he strides out of the room before while everybody else stays behind and shouts "Barneeeeeey, Stiiiiinsooooon" as a reference to the Leeroy Jenkins meme. He even uses the same voice!
Barney (played by former child actor Neil Patrick Harris) saying "Call me crazy, but child actors were way better back in the 80s".
Lily says in a bar, "We need a drink that can turn subtext into text!" The last half of the sentence is almost word for word what Giles tells Buffy in the episode Ted".
Lethal Weapon: I'm too old for this sh... stuff!" Ted watches the films.
When Marshall describes how wonderful it feels to sleep in a nightshirt, the accompanying fantasy sequence mimics the dream sequence from The Big Lebowski.
Steve "The Blitz" is a walking Shout-Out to LOST. His name has the same form as his Lost character, Hugo "Hurley" Reyes. Both characters are chronically unluncky. When asked for random numbers, Steve calls out the Arc Numbers from Lost which "cursed" Hurley (making this one a literal shout out). Finally, he compares the unlucky streak to being on an island for a very long time, which is how Hurley's character arc ultimately ends.
In order to argue against waiting for a sign from the universe, a story of Marshall wanting to leave GNB is brought up, where he is walking down a street. An older model ambulance drives by, as Marshall notices a white sign with a no symbol, and across the street a fire house is for sale. Thinking he knows what the universe wants him to do, he asks someone for a phone, who turns out to be Ernie Hudson, who asks, Who ya gonna call?
Lily and Marshall move out of New York, and Robin goes to visit them, only to feel like their prisoner. When she wakes up Lily is standing over her like Kathy Bates with a sledgehammer...erm, croquet mallet.