Robbie Muirhead made an early breakthrough for Killie, but Frazer Wright and Muirhead hit back for St Johnstone, who should have stretched their winning margin in the second-half.
The hosts took just four minutes to find an opener as Muirhead fired the ball into the net after Alan Mannus had palmed out Kris Boyd's shot.
But Saints responded well to this early setback and David Wotherspoon went close with a drive before Wright (31) levelled with a precise header from Lee Croft's inviting cross.
Killie's defence was creaking and St Johnstone struck again before the break when Wotherspoon's corner fell to Anderson (44), who flicked the ball home.
Anderson nearly added a second after the break, nodding over from another corner, while fellow goalscorer Wright was inches away with a looping header.
There was a further let-off for the home side when Wotherspoon lashed the ball inches wide and Craig Slater could have snatched a point for Killie but he sliced his effort.