Barnsley took their first real opportunity of the game to go one up when O'Grady converted a cross from the right, giving Alex Smithies no chance in the Huddersfield goal.
Huddersfield slowly grew into the game and almost levelled when Sean Scannell found Adam Hammill in the area, but his cross failed to pick out a man and when the ball finally found Oliver Norwood he curled wide.
Barnsley doubled their lead nearing the end of the first half as new striker Pedersen took advantage of a ball from the left before shooting into the bottom corner.
Huddersfield were presented with a golden chance to get a goal back shortly after the break when Jean-Yves M'Voto misjudged a simple ball over the top leaving James Vaughan to run clear, but the striker sent his shot wide.
Vaughan soon made amends in the 61st minute when he made the most of a well-crafted through-ball from Clayton before slotting home to make it 2-1.
The striker continued to cause problems and he almost brought the scores level when he took down a lovely ball from Adam Clayton before volleying straight at Mike Pollitt in the Barnsley goal.
Huddersfield went on to dominate possession in the final stages, but were unable to create anything of real value, leaving Barnsley to close out the game and hold onto a 2-1 victory.