laptop only turns on if the power cord is turned on

Since this is a new computer I suggest you contact Gateway technical support. I only say this because it should still be under warranty and you want to be careful not to void the warranty. It could be a manufacturing defect. Just out of curiosity, did you fully charge the laptop battery before attempting to use it without the power adapter?