The result lifts Sydney to fifth spot and sets up a tantalising knockout match against fourth-placed Melbourne Victory at Etihad Stadium next Friday.
Having missed out on a top-six spot on goal difference last season, this campaign it worked in their favour.
With Newcastle’s victory on Friday bringing them level on points with Sydney, only a loss by a two-goal margin or more would have denied them a finals spot and handed the Jets sixth place.
A Terry Antonis screamer opened the scoring at Allianz Stadium with Richard Garcia ensuring late drama with a winner in extra time.
Rostyn Griffiths scored a consolation goal for a Glory side playing only for pride.
The last time Sydney hosted Perth in February the cove unfurled a banner calling for Frank Farina’s head, as the side languished outside the top six looking unlikely to make finals.
On Sunday however, the banner they held up was one of tribute, portraying retiring former skipper Terry McFlynn as the patron saint of the club as Sydney secured their spot in the playoffs in their last home game of the season.
And while Farina’s future at the club is not yet assured, the coach is now guaranteed at least one more game at the helm.
Sydney dominated possession in the opening stages but it was the Glory who created the first chance of the match with Chris Harold just going wide with a an early strike.
The Sky Blues returned fire moments later with Antonis putting keeper Jack Duncan to work.
And Antonis eventually broke through in the 38th minute with a clever Alessandro Del Piero pass setting him up to fire from range.
The Glory found the leveller moments before the half-time whistle with a Nebojsa Marinkovic corner getting past the Sydney defence and falling to Griffiths for the easy tap-in.
Sydney emerged from the break desperate to regain the lead with the Glory gloveman denying Del Piero his 11th goal of the season moments into the half while Garcia forced another save from Duncan as the clock wound down.
Garcia eventually found the winner in the 93rd minute to seal victory.
Finals week one
Friday April 18: Melbourne Victory v Sydney FC 19:30 at Etihad Stadium
Saturday April 19: Central Coast Mariners v Adelaide United 16:30 at Central Coast Stadium