The U's leading scorer ensured his side bounced back from a midweek loss at Accrington with his 18th and 19th goals of the season.
Victory moved Shaun Derry's side up to 11th in the table, where they remain five points adrift of seventh spot.
After Jordan Bowery's early angled attempt was thwarted by Cambridge goalkeeper Will Norris' legs, Berry pounced in the 37th minute.
Crewe failed to clear their lines after Harrison Dunk's close-range header was saved by Ben Garratt and Berry seized possession inside the box and drove the ball into the far corner.
Dunk went close to adding a second on the stroke of half-time when he profited from Billy Bingham's miscued clearance, but Garratt saved the day for Crewe.
And the Cheshire side were level in the 58th minute when Chris Dagnall's cross was diverted into his own net by Leon Legge.
Berry, though, showed a clinical finish, driving a 72nd-minute free-kick low into the bottom corner to win it for the U's, who finished with 10 men after substitute Paul Lewis was sent off for a reckless lunge at Dagnall in the last minute.
Match report supplied by the Press Association.
Luke Berry scored in both halves as Cambridge United kept their slim play-off hopes alive with a victory at Crewe Alexandra.