Ryall headed home on the stroke of half-time to open the scoring and Grant doubled the lead with just over 20 minutes to go.
In a dramatic conclusion, Sydney had Terry McFlynn sent off with five minutes remaining before Adam Griffiths brought down Manny Muscat in the box with Jeremy Brockie converting a penalty for Wellington.
However, Sydney clung on to end a five-match winless run.
They remain at the foot of the table but are now level on 10 points with Brisbane Roar, who lost 1-0 at Western Sydney Wanderers.
Shinji Ono scored the only goal from the penalty spot three minutes from time to lift the Wanderers up to fourth.