Referee Clive Oliver showed a red card to Peterborough's Gaby Zakuani after just seven minutes after the DR Congo international appeared to clip the heels of Cobblers' forward Ikechi Anya.
And Posh sealed all three points courtesy of Charlie Lee's header after 33 minutes.
Gray said: "Forwards are paid to score goals and midfielders are paid to create chances but neither of those things happened.
"We are gifting teams goals through poor marking and it cost us dearly but we should have done better by not conceding the free-kick in the first place.
"All we can do in our situation is keep battling on and I may try to bring in some players on loan to freshen things up."