Bristol, who welcomed former All Black Steven Luatua back, led by 25 points after a dominant first half. However, Lam took the chance to replace his All Blacks trio of John Afoa, Luatua and Charles Piutau early and the London Irish side took full advantage.
It wasn't the first time London Irish had stymied Bristol, they played out a 27-27 draw last season.
Taking three points from the game was enough to remain three points clear at the top of the Premiership after second-placed Exeter were beaten by former Hurricanes coach Chris Boyd's Northamptonshire side.
Lam said his players needed to get used to not being the underdogs like they had been in previous years.
"The players are favourites now. To play with a big lead, they have to be even more dogged," he said.
Being up at halftime, Lam told them they had to expect the Irish would come back at them. So to counter that they needed control of the ball, but three turnovers in the first moments and then penalties conceded took the momentum away from Bristol.
Competing to the last seconds paid dividends for Northampton when a charge-down of a last-minute conversion attempt helped them beat Exeter 13-12.
Helping Northampton to the win was former Blues back Piers Francis who landed a conversion and two penalty goals for his side.
Centre Joe Marchant, who played for the Blues in Super Rugby last year, has been making his mark with Harlequins this season. He made his 100th appearance for the club at the weekend scoring two tries in three minutes in their 24-12 win over Sale. He has scored 28 tries for the club.
In transfer news, former Crusaders halfback Willi Heinz, who played Test rugby for England is to leave his Gloucester club to join Worcester next season and former Highlanders and All Blacks first five-eighths Lima Sopoaga is moving on from Wasps to play for Lyon in France.