Troy Parrott was left crying tears of joy after scoring a remarkable 96th-minute winner to secure his hat-trick and the Republic of Ireland a World Cup play-off spot by beating Hungary 3-2.