Adebayo Akinfenwa converted a nerveless penalty in the third minute of stoppage time – his first goal at Championship level – after Kasey Palmer handled a shot by goalkeeper David Stockdale.
It completed a second-half comeback that kept the Chairboys' survival hopes alive, with them now six points behind fourth-from-bottom Derby County with three games remaining.
Ainsworth said: "I think people can see the upward turn in what's been happening here and, whatever happens, I'm going to be really excited for the future of this football club.
"The future at the moment is Saturday, against Cardiff. If we can get three points there, wow, that could really upset a few teams.
"I'm looking forward to going there and seeing what we can do.
"Tonight, I'll just have a calm down for a minute because it's one of those nights in which chaos has ensued.
"When I saw Bayo pick up the ball for the penalty, Joe Jacobson's usually the penalty-taker.
"He had a knock – I thought he had a nasty injury, but then he walked over and took the corner that ended with David Stockdale's shot gaining the penalty.
"It was just madness and to try and compute it all is impossible. I'm going to have to watch the replays on that one."
Bristol City led at half-time through Tyreeq Bakinson's stunning long-range strike, but Wycombe showed their battling qualities by levelling through Uche Ikpeazu's header from Anis Mehmeti's cross.
They looked set to be held to a draw, however, before 38-year-old Akinfenwa capped an astonishing phase of play by sending Daniel Bentley the wrong way from the spot to spark wild celebrations on the home bench.
Bristol City boss Nigel Pearson said: "We have players out there who just didn't do what the team needed and that is something that I'm not going to tolerate, moving forward.
"What goes on in a dressing room after a game I'm not going to disclose to you, but I'm not happy about how we, collectively, don't see games out.
"First half was very good, the second half we just drift – we were comfortable and we end up losing a game that we were comfortable in."
When asked why they allowed their standards to slip in the second half, Pearson added: "It's because we have players who don't apply themselves in the right way.
"We need a team ethic which shines through, not players who think they can do what they want.
"It's not about players who run through walls for me, it's about players being professional."