Scott Boden scored his first Wrexham goal in the 73rd minute to equalise for the Dragons but it took just five minutes for the hosts to reclaim the lead.
Macclesfield striker Scott Wilson then completed his hat-trick before David Fitzpatrick’s goal added to the scoreline.
It was a disappointing afternoon for the Dragons and instead of potentially going top of the Vanarama National League table, they dropped to third.
Keates says the performance was out of character for his side and pointed at the poorly managed period after Boden’s equaliser as the root of their problems.
“We weren’t good enough," he said. "In the first half, Macc were by far the better team and we were lucky to get into half-time just 1-0 down.
“In the second half, we were a lot better and made it into a contest. We should have had a penalty before we scored but didn’t get it.
“We scored a good goal and then we were on top. But fair play to Macc because they stayed in there and their second goal was against the run of play.
“In that period after we scored, we didn’t manage the game well enough. We were a bit naive and that’s not like us.
“We had nearly as many fans here as Macclesfield did and it turned it into a bit of a home game. The momentum and atmosphere were with us after our goal and I think we got a bit carried away. It’s something we’ll learn from.
“We’re massively disappointed. We’ve dropped a position in the table but it’s going to be tight for the whole season. You’re going to have ups and downs and this is our down this week.”
For more news, reaction and action from across the National League, like us on Facebook and follow us on Twitter and Instagram.