Ndumiso Mabena scored the only goal of the match in added time at the end of extra-time to ensure Dikwena's passage into the quarter-finals.
A tight affair in Polokwane saw the two PSL sides managing to contain each other for the first half-hour.
Dikwena then upped the ante as Bongi Ntuli was denied by Ayanda Dlamini in the 37th minute, with the striker's first touch slightly too heavy and allowing the keeper to come out and block his shot from close range.
The two sides went into the half-time break at 0-0 as both defences held firm and dealt with the danger in front of goal.
Mxolisi Kunene had a great chance to give his side the lead in the 65th minute but he blasted a shot over the bar from close range.
The match ended goalless after 90 minutes and was forced into extra-time.
Baroka should have taken the lead in the 93rd minute but for Mzimela, who was well positioned to collect a headed effort at his far post from close range.
Stars then had a chance at the other end as Ntuli teed up Robert Ng'ambi inside the box, but the latter's effort went wide of the far post.
Sphamandla Mlilo was then sent off for a second bookable offence in the 115th minute as Dikwena were left to finish the tie a man down.
Late drama saw Mabena grab the winner for the visitors in the second minute of referee's optional time after the allotted 120 minutes.