Martin O'Neill admitted Aston Villa were pushed all the way by a committed Gillingham side before securing a 2-1 FA Cup third round victory at the Priestfield Stadium.
In-form Villa were at full-strength but required a disputed late penalty from James Milner to overcome the League Two side on Sunday.
Milner had earlier opened the scoring for the Premier League side before they were pegged back by Simeon Jackson's equaliser.
"It was a really difficult cup-tie. I thought it was going to be tough before kick-off and so it proved," O'Neill told the club's official website.
"If the players hadn't thought they were going to be in a real cup-tie, they knew they were after 10 minutes. It was just an exceptionally difficult game and I am delighted to get through to the next round.
"James opened the scoring for us and I thought that first goal was fantastic. It gave us a lift and kept us going but then they equalised and it was all hands to the pump for us after that.
"Gillingham threw everything at us and the home crowd got right behind their team. They were spirited so all credit to them.
"We got the winner but we certainly never felt comfortable."