I went to the US last year and didn't realise that I needed an ESTA. Tried to check in; was told I needed an ESTA; went to the airline desk; applied for and was approved for one. All took about 15 minutes.
Not the recommended as my blood pressure was probably off the scale but as long as you...