Goals from Aaron Pierre and Alfie Mawson – either side of a Durrell Berry strike – ensured the Chairboys remain in the League Two title shake-up after back-to-back losses.
“That was a huge three points,” said a relieved Ainsworth. “We’ve put the two defeats to bed and avoided the manager of the month curse.
“We’ve shown fantastic character because forget about the league table, that was a tough game against Cheltenham.
“They’ll beat teams this season definitely in their remaining four games. To not lose was very important and to win was excellent.
“Our two centre-halves are having a goal-scoring competition and they were both very solid too.
“We responded to their goal immediately and then saw it out very well so I am very pleased.
“We lost Joe Jacobson to a nasty tackle, we lost Alfie to an ankle injury and Holloway had cramp. We’ve been stretched to the limit and the next three weeks are going to be tough.”
Trevor Carson denied Fred Onyedinma with a one-handed save in the 21st minute as Wycombe controlled much of the first half.
They were millimetres away from opening the scoring in the 36th minute when Nico Yennaris’ shot cannoned off the underside of the bar and onto the line.
Wycombe were close again when a scramble in the area saw Jack Deaman deny Mawson with a block, but from the resulting corner the deadlock was broken.
The ball was cleared as far as defender Pierre, who fired through a crowded box to put Wanderers in front two minutes into first-half stoppage time.
Cheltenham levelled in the 54th minute when Berry capitalised on a mistake from Paul Hayes and found the bottom left corner for his first goal for the club.
But less than two minutes later Wycombe deservedly regained their lead when Mawson headed in Sam Saunders’ corner.
Defeat for the Robins means they remain bottom of the Football League, three points from safety with four games to play.
“I’ve said the same things I’ve said every week,” said manager Gary Johnson. “If we want to win a football match we have to do a bit more than kick it and chase it.
“We need to get it down, have some guile in their play and we need strikers to hold it up, wingers to put crosses in, midfielders to pass it and defenders to win the day in the penalty area.
“Unfortunately that’s still not there.
“I was pleased with our goal which was our only bit of play really, but it didn’t take long for them to score again, which was disappointing.
“We keep conceding set plays and our only hope is that there are two teams worse than us at the moment.
“As a team they are trying, but a lack of quality and combinations are costing us.”