The Lions -- a composite team featuring the best players from England, Scotland, Wales and Ireland -- looked to be in control with just a few minutes left on the clock after Leigh Halfpenny had kicked the visitors into the lead.
But a devastating counter-attacking move, featuring two slick offloads, saw Ihaia West charge through the Lions defense, giving the 40,000-strong crowd in Auckland's Eden Park reason to roar.
A chance to win the game was presented to the Lions in the dying moments, but an overthrow in the lineout allowed the Blues to regain possession and seal a 22-16 victory.
"There were lots of positives out there, and I thought our set-pieces were good," said Lions coach Warren Gatland. "We played some positive stuff.
"There were a lot of periods where we defended well and put them under pressure. They had just one or two moments in the offload, and we know how dangerous they can be.
"It was a close game and probably what hurt us was the number of penalties we gave away. That costs us momentum in the game."
Tough tests ahead for Lions
The Lions, in the second week of a 10-match tour, improved on Saturday's 13-7 below-par victory over the New Zealand Barbarians, a team made up of Super Rugby fringe players.
But the tourists, fielding a completely different line-up to the one that started last week's victory -- with 11 of them Lions debutants -- suffered from a lack of discipline against a Blues side that is currently bottom of the New Zealand Super Rugby conference.
In testing conditions -- rain hammered down for large parts of the game -- the Lions looked to be heading into the break with the advantage after a CJ Stander converted score negated Reiko Ioane's early try for the Blues.
But when a Blues penalty ricocheted off the post on the stroke of halftime, Sonny Bill Williams -- a likely candidate to start for the All Blacks when they play the Lions in a few weeks' time -- pounced and Stephen Perofeta's conversion made it 12-10 to the hosts at the break.
In a tense second half, the Blues inched further ahead through replacement Ihaia West's penalty.
Despite being reduced to 14 men for 10 minutes following replacement Liam Williams' 57th minute yellow card, the tourists did manage to close the gap to two points through Leigh Halfpenny's boot, while a long-range effort from the Welshman gave his side a 16-15 lead with 10 minutes remaining.
But in a thrilling finale, a superb Williams offload released West, who crossed the tryline to complete a scintillating attacking move.
The Lions next face the Crusaders, a Super Rugby franchise unbeaten in 14-straight games so far this season, on June 10 in Christchurch.
The first Test against the All Blacks takes place on June 24. The Lions has only once enjoyed a series victory over New Zealand, back in 1971, and this crop of players will be underdogs playing against an All Blacks side on a record run of 45 unbeaten home games.