Substitute Darryl Duffy came off the bench to grab the second-half winner as the Robins overturned a 2-0 deficit to win 3-2 at Sixfields.
Early goals from top-scorer Adebayo Akinfenwa, with his 14th strike of the season, and an own goal from defender Billy Jones gave Northampton a 2-0 lead.
But Cheltenham scored twice in three minutes to get back on level terms before the break through Darren Carter and Chris Zebroski before Duffy bagged the winner 10 minutes from the end.
Boothroyd said: "We started very well and got on the front foot. We created lots of chances and put them under pressure. But towards the end of the first half we stopped doing all those good things and allowed Cheltenham back into it.
"We didn't expect them to come back but they did and you have to give credit to Cheltenham for that. We seemed to bring out the best in them.
"We're always going to score goals but we shot ourselves in the foot three times, we've conceded three goals from losing possession in the attacking areas. We attack as a team and defend as a team but we didn't do that.
"As a group we've improved enormously but to lose three, win three and lose three isn't good enough. So we're either naive or daft because we keep giving ourselves a mountain to climb.
"I'm very disappointed but we've got to make sure we stay in the pack now. We got exactly what we deserved because we didn't maintain our momentum for the rest of the game after such a good start."