Philip Lowry's 10th-minute goal proved enough to keep champions Linfield ahead of the chasing pack at the top of the Irish Premiership.
Midfielder Lowry dispossessed Ballymena's Chris Rogers and went on to shoot past keeper Wayne Drummond.
Linfield should have scored more with William Murphy's volley hitting the crossbar and Mark McAllister incredibly missing with the goal at his mercy.
In the second half Rogers headed against a post for United.
McAllister then ran through with another chance to get Linfield's second but lost control at the vital moment.
Linfield are now four points clear at the top as Portadown lost at home to Crusaders, allowing Clitonville to move into second place.