The victory giving Didcot back-to-back league wins at home for the first time in over a year.
Jack Longford gave the hosts a perfect start, heading in Ben Whitehead's cross after just 23 seconds.
Didcot looked to double the lead when Guildford's Matthew Oldrine error let-in John Mills but he was unable to convert the chance.
Despite the Didcot pressure, the visitors equalised from a corner. Guildford’s Ben Walshe hammered home from 30 yards giving Diddy keeper James Foster no chance.
Sam Elkins restored Didcot's lead shortly afterwards when he fired home at the second attempt past Guildford keeper Anthony Hall.
Didcot added a third before half time when Longford headed home a Josh Dutton-Black corner.
The home side let the visitors back into the game in the second half but Guildford were unable to take their chances until late on. A solo run from Joel Greaves and a smart finish made it 3-2 and left the hosts with a nervous end to the game.
With full time approaching, Guildford substitute Nuno Pereira was put through on goal, with only Didcot keeper James Foster to beat, however his tame effort ended in Foster's grasp and Didcot held on for the 3 points.