Centre-half Williams failed to clear a Lincoln cross and Forrester pounced to ram the ball home from 15 yards.
Lincoln's Forrester has scored hat-tricks in his two previous games and his right-footed strike was enough to give Lincoln all three points.
Swindon were left rueing their missed opportunities to win the game, but bad finishing let them down all afternoon.
The opening period of the game was scrappy and the ball was hoofed from one end to the other.
Swindon striker Lee Peacock had the first effort on goal in the 11th minutes, but his right-footed volley went high and wide.
Swindon centre half Andy Nicholas had an opportunity after Jack Smith teed him up. Nicholas ballooned the ball miles over the bar with his right-footed strike.
Left midfielder Aaron Brown opened up the Lincoln defence with a fine solo run. He centred to Fola Onibuje who could not take the chance.
Lincoln left-back Paul Mayo had his side's first shot on the half hour mark. Lee Frecklington's through ball set him free but his shot lacked power.
Swindon's forward Onibuje almost got on the end of Jack Smith's free kick but could not direct his header.
As the game edged towards half time Curtis Weston had a great opportunity to score. The midfielder shot right-footed across the face of goal and the ball went inches wide.
Swindon created more opportunities after the break with Ricky Shakes shooting left-footed after being set up by Onibuje's header.
Lincoln striker Forrester hit a smart half-volley that went straight to Phil Smith in the Swindon goal.
Swindon midfielder Curtis Weston smashed a right-footed drive well wide of the left hand post after being tee-ed up by Lee Peacock.
On 63 minutes Lincoln opened the scoring with Forrester. A cross from Lincoln was not dealt with by Williams, the Swindon boss, and the ball fell to Forrester.
The Lincoln striker made no mistake as he blasted the ball home right-footed from 15 yards.
Swindon striker Onibuje almost got his side back into the game but his header from Shakes' cross was straight at Alan Marriott in the Lincoln goal.
Swindon pressed forward looking for an equaliser but Lincoln held firm and restricted them to few opportunities.
Swindon sent on substitute Royce Brownlie to add some more pace to the attack, but he could not get into the game.
Swindon tried to press in the last period of the game but failed to carve out any decent openings as Lincoln took all three points.