It depends on which part of Grafton Street you will begin your journey. Look at the map
http://www.guidetodublin.com/map.shtml
and
http://www.dublinmapped.com/ - a clearer map. You can pull it to the right until you see Heuston Station beside the river.
This second map only identifies the major one way streets, and Grafton Street (pedestrianised) is not named. It is shown as the thin street at the corner of St. Stephen's Green (but you will have seen it on the first map). If you are starting here, allow 10 mins to walk to the other end of Grafton Street, another 10 mins to go along Dame Street, 3 mins more to cross down Parliament Street to get to the Liffey, turn left and 20 mins more to walk to Heuston Station. The station is at the sixth bridge after you turn left. I have walked it, and it takes a bit longer than you'd expect. Best part of 45 minutes from St. Stephen's Green, but a bit less if you start from the bottom end of Grafton Street. It is a pleasant walk if you are not tied to time.