St Johnstone leapfrogged over their hapless foot of the table rivals in a game in which the better side lost.
After a less than inspiring first half, Rovers camped in the St Johnstone half throughout the second period, throwing in chance after chance. But for some woefully inaccurate shooting and inspired goalkeeping by Allan McGregor, they would have left McDiarmid Park with at least a point.
Saints' goal came much against the run of play when Kevin Fotheringham pounced on an uncharacteristic defensive error by Raith left -back Moussa Ouattara to drive the ball low into the net.
Seconds later the visitors almost equailised when McGregor's fumble from a John Martin header - his only mistake of the match - saw Francisco Ortiz Paquito stretching to knock the ball intothe net, but the influential Spanish veteran's effort flew well over the barf rom close in.
St Johnstone held on to take all three points, but Raith had chances to seal the game long before Fotheringham's 73rd minute strike.
With only three minutes of the second half gone, Rovers' Jonathan Smart and Wesley Daly both shot wide.
McGregor saved brilliantly from Tomas Hajovsky after 54 minutes and from Bailey on 67.
The keeper did well to stop a Hamed Sacko run when carelessness by central defender Ryan Maxwell let the French forward in on goal.
John Connolly was delighted to take this first league points of the season, but there are signs for Raith boss Claude Anelka that his team, with 14 new signings, are beginning to gel into an effective unit.