Lam's men eventually ran out 14-8 winners thanks to a stunning second-half try from Matt Healy.
The win means their unbeaten home record remains intact but it wasn't all plain sailing after Wayne Pivac's side took an early lead thanks to the boot of Steve Shinger.
They further extended that lead when Harry Robinson crossed over but Connacht got themselves on the board with a Jack Carty penalty.
But it was their performance after the restart that pleased Lam after he watched his side take control of the match and close out the win.
"We had a clear plan at half-time of what we wanted to do," he said.
"One of the key things that's driven us so far is the work done off the ball, but we weren't working hard enough, so we didn't create any opportunities and our carries weren't strong enough.
"We were getting dominated at the breakdown and we didn't have to talk much about tactics - it was all tidying up and getting go-forward ball. Once we got that, we could put them under pressure, so it was those little areas that were costing us.
"I think we got some momentum, based on better carries. We tried to play in front of them - in these sort of conditions, you have to get in behind them, but also carry a lot more directly. Once we did that, we could build momentum.
"We could vary it up with some kicks as well, which we did in the second half. It still wasn't perfect, but we got the crucial four points."
Click here to view the best images from Connacht's dramatic triumph over Scarlets
Follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the GUINNESS PRO12
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland