A family member of Ronaldo fuelled retirement rumours before kick-off as a late winner sent Portugal to the next round in a thriller.