Yes, changing the user agent was all I needed to do in order to be permitted to log in. Not that javascript is required for GMail - it has a perfectly serviceable 'basic HTML' mode. Google's own support document[0] provides a link to it, although notably it's not canonical (the link will be different you than for me (why??)).
The same document is now obsolete - it claims "If you're using a browser that isn't supported, you'll see Gmail in HTML view." This is not true, as in fact what you'll see is "up yours, go away".