Jacob Mellis' angled drive gave the Tykes a deserved lead after 32 minutes but Jordan Rhodes equalised just before half-time against the run of play. And substitutes Fabio Nunes and Gomes then combined for the late winner, the veteran former Portugal striker with the finish to secure a 2-1 victory.
Second-placed Blackpool hammered Middlesbrough 4-1 as Nathan Delfouneso scored his first two goals for the club on his home debut. Andre Amougou pulled one goal back after the on-loan Aston Villa striker had put the Seasiders 2-0 up by the interval, only for Thomas Ince to make it 3-1 soon after, before Elliott Grandin pulled rank to convert a late penalty.
Brighton won 1-0 at Watford to remain third as Craig Mackail-Smith won and converted a penalty early in the second half for his sixth goal in four games.
Hull, in fourth, also kept pace with the leading group with a 3-1 win away to derby rivals Leeds. The home side took the lead through Luciano Becchio's disputed eighth-minute penalty after Hull full-back Joe Dudgeon was adjudged to have fouled El-Hadji Diouf.
But Ahmed Elmohamady equalised before setting up Hull's second for Abdoulaye Faye just before the half-hour mark, the defender heading his third goal in successive games. The Egyptian was again the provider as Robert Koren killed the game off in the 76th minute.
Cardiff also remain just a point behind the leaders in a closely-matched top five after a 2-0 win at struggling Millwall thanks to goals from Peter Whittingham and Craig Noone.
Ten-man Nottingham Forest battled for a 1-1 draw at Crystal Palace. Palace midfielder Kagisho Dikgacoi headed his second goal in successive games and Forest had Adlene Guedioura sent off following a clash with Mile Jedinak. But Dexter Blackstock grabbed a dramatic equaliser nine minutes from time to take Forest's points tally into double figures.
There were 2-1 wins for Birmingham against Bolton - Leroy Lita and Marlon King scoring either side of a spectacular goal from Bolton's Chris Eagles - and Bristol City away to Peterborough. Sam Baldock continued his prolific start since joining City with a quickfire second-half brace before Lee Tomlin won and converted a last-minute penalty for Posh.
Jamie Ward's double inspired Derby to an overdue 3-2 win over Charlton, Craig Bryson also on target, but they had to hang on after Danny Green and Yann Kermorgant struck within a three-minute period to put the game back in the balance.