Villa put in a spirited display with Christian Benteke seeing a header cleared off the line early on.
But an error from captain Ciaran Clark saw him slip under pressure from Edin Dzeko, allowing Carlos Tevez to score the only goal of the game.
"I thought we played well enough in spells," Lambert told Sky Sports.
"We had a right good go at it and had one or two half chances such as when Christian had one cleared off the line. We gave them a game that's for sure but the goal was ridiculous.
"I don't think it's a foul [by Dzeko on Clark]. I know what Ciaran is trying to do but you don't take a chance like that when there are only two of you at the back. You can't make that mistake.
"But Clarky has been great for me. You've got to hold your hand up and come back strongly. Over the course of the season he's played to a really high standard. He'll certainly learn from it."
Benteke was also denied a late penalty for a foul by Matija Nastasic and Lambert was left frustrated by the feeling that key moments had not gone his team's way at Villa Park.
"When you're playing teams like Manchester City you have to take your chances when they do come around," he added. "We might have had a shout for a penalty right at the death there."
Asked if confidence at the club is intact, Lambert said: "It is. We played well at Arsenal last week and didn't get anything. And we were well it in here against a very good side vying for the title.
"I couldn't ask for any more in terms of effort. We wanted to create more chances but we were in the game against them. They're on another level from us at the moment.
"We've got to compete with the teams around us and if we keep playing like that we'll win more often than not."