Despite leading 19-0 until the final minute of the opening half, the Wizards struggled to overcome a spririted Llanharan outfit, who were fit and played withgreat heart.
Early tries by wing Richard Carter and centre David Hawkins were followed by a second from Hawkins with two converted by Jamie Davies.
Llanharan got on the board with an injury-time penalty by Wayne Jervis, but within five minutes of the restart, Carter went over again for Davies to convert.
Llanharan replied with a try by hooker Alan Williams and Jervis kicked a penalty, though Davies added a further Aberavon score with a penalty shot.
Aberavon were rocked again when flanker Ceri Jones went over for a last-minute try that Jervis converted from the touchline.
In Division One, leaders Maesteg won a local derby by 37-15 against Bridgend Athletic and scored five tries through wing Alun Brown (2), centre Paul Morgan, veteran scrum half Kevin Ellis and fly half Mark David.
David converted three and placed two penalty goals, but the Athletic responded with tries by Gavin Pound and Andy Tollentino and skipper Stuart Morris placed a conversion and penalty.
Wales head coach Warren Gatland and captain Sam Warburton say their first prioirty on Sunday in the opening game of the World Cup is to win against Uruguay and not get overly concerned with points difference.
With only days to go until the biggest rugby competition in the world begins, rugby fans visiting Cardiff this autumn will be able to enjoy a special display at National Museum Cardiff as part of the celebrations surrounding the Rugby World Cup.
Geraint John has taken up the new role of WRU elite coach development manager having arrived in Wales last week. WRU TV caught up with him at the WRU rugby department's strategy day at the Millennium Stadium.
The entire Welsh Rugby Union Rugby Department gathered at the Millennium Stadium earlier this week where WRU Head of Rugby Josh Lewsey looked back on a year where structural and strategic changes have seen significant progress made
The Welsh Rugby Union has released a specially produced video to spearhead a new campaign to help promote the values of rugby union. The video, entitled Let us Play underpins the WRU rugby department's philosophy - to engage, transfer and retain players, coaches and referees.