In what turned out to be a very entertaining friendly game, Kevin Strathdee put United ahead in the opening minutes by lobbing a Daniel Bolton pass over the head of the Gordon keeper.
After Bolton had rattled a shot against the post, Gordon equalised when cashing in on a United defensive error.
Gordon, in turn, took the lead, but Ross Scott put United on level terms before the interval when driving home a Matthew Shepherd pass.
Following the changeover, Gordon went ahead for a second time through a well-worked goal. United came bouncing back and after linking up with Scott, Kevin Strathdee drilled away an equaliser.
Gordon had the last say, though, by netting what was to be the winner late on in the game.