Walker's clumsy challenge on John Baird allowed Aaron Muirhead to lash home a well-deserved 85th-minute opener that looked set to send the Jags top of the Scottish Premiership table.
But the midfielder burst forward three minutes later to smash the ball into the top corner from 20 yards to earn Hearts a 1-1 draw and move them to within 11 points of their nearest challengers following their punishment for going into administration.
Locke said: "Fair play to Jamie. He switched off a bit at the corner and got caught wrong side and gave away the penalty. But he kept his head up and he's come up with a wonderful strike to get us back in the game.
"I'm delighted with that, it was just the 30 seconds of concentration that cost us. But we are learning all the time. We are a young team and we are going to make mistakes.
"It's important we respond in the right manner and we did that tonight."
Locke, who had six players involved in Scotland Under-21s' 6-0 defeat by England on Tuesday, added: "The players showed unbelievable character again and showed they are fighting for the cause. It was certainly a goal worthy of an equaliser.
"The spirit's there. It's been a difficult week. We have not had much time on the training ground with half the boys being away.
"Preparation wasn't great but they showed they are willing to battle right to the end."
Thistle boss Alan Archibald was proud of his players' performance but was dejected at their failure to claim victory.
"I thought we deserved three points," he said. "It felt like a defeat at the end given we were winning with five minutes to go.
"I thought we dominated possession and passed the ball really well. They were a credit to themselves and the club the way they went about their business.
"They were brave taking it and passing the ball in dangerous areas. If we were just a wee bit more clinical in the final third we would have been ahead (earlier)."
The former Thistle defender, who lost Sean Welsh to a dead leg at half-time, sensed a danger after their goal celebrations.
"For some reason as a team and a defender you drop a yard back thinking it's going to help but it doesn't," he said.
"When you have just scored you want to keep the ball for two minutes, kick it in the stand or whatever, but we couldn't do that and as a manager you are always worried about that spell."