The African side – which along with Panama had already been eliminated before its clash at the Mordovia Arena – last tasted victory at the 1978 tournament when they beat Mexico 3-1.
Before its second-half fightback, Panama had looked like sealing a maiden FIFA World Cup victory when Jose Luis Rodriguez's long-range strike was deflected in by Yassine Meriah for an unfortunate own goal after 33 minutes.
Tunisia had been woeful in the opening period, but started the second half strongly and pulled level six minutes after the restart when Fakhreddine Ben Youssef tapped in from close range after a flowing move.
Sunderland forward Wahbi Khazri – who scored in the 5-2 defeat to Belgium last time out – was Tunisia's brightest spark throughout and he got the goal he deserved after 66 minutes, slotting home after another impressive team move.
Panama huffed and puffed in the closing stages, but were unable to find a goal that would have ended its memorable FIFA World Cup campaign with a flourish.