Beckford netted from close range midway through the second half after Colchester had failed to clear their defensive lines, to secure a fifth straight league win.
Leeds edged a tight first half, although goalkeeper Shane Higgs had to palm David Fox's effort away early on, while Beckford was denied twice by the assistant referee's flag and was then foiled by Colchester goalkeeper Ben Williams.
But the visitors were ahead two minutes after the break when Bradley Johnson headed in Robert Snodgrass' free-kick from close range.
Colchester were back on level terms in the 57th minute when Kevin Lisbie was tugged by Rui Marques in the area and the striker slotted home the resultant penalty.
Leeds restored their lead seven minutes later through Beckford, who converted from six yards after Alan Maybury's defensive header had fallen short to net his fifth of the season.