Windows 8.1 has some really weird upgrade mechanics associated with it and it's really picky about what kind of product key it will take.
If you find yourself in the position of needing to install Windows 8.1 but only have a Windows 8 product key, as might have happened for PCs sold at retail and upgraded prior to end-user delivery, it turns out there's actually a fix.
You can use generic product key.
Windows 8.1 (Not Pro): 334NH-RXG76-64THK-C7CKG-D3VPT
Windows 8.1 Pro: XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB
These keys won't activate, but they're useful for making images as well, which is how I found out about them.
Once Windows 8.1 is installed, you can switch back to a Windows 8 product key in System Properties and it will activate like normal.