You can call the REST API to determine the fields on a layout, although some parsing is required on your part. First, call:
/services/data/v36.0/sobjects/Account/describe/layouts/
(Replace Account with your object). If you don't use record types, you'll get a page layout. Otherwise, you'll get a record type list:
{"layouts":null,
"recordTypeMappings":
[{"available":false,
"defaultRecordTypeMapping":false,
"layoutId":"..............",
"master":false,
"name":"............",
"picklistsForRecordType":[],
"recordTypeId":"...............",
"urls":
{"layout":"/services/data/v36.0/sobjects/Account/describe/layouts/........."}},
...],
"recordTypeSelectorRequired":[true]}
Once you know what record type you want, use the layout URL for that record type:
{"buttonsLayoutSection": ... describes buttons ...,
"detailLayoutSections": ... describes page layout sections...
{ "layoutRows": ... describes each row ...
[ { "layoutItems": ... describes each item ...
[ { "layoutComponents": ... describes each component (may have multiple parts, like Name on Lead/Contact
[ { "value": "FieldName" ... and other data
Honestly, there's a ton of data in this JSON, and it did take me a couple of days to get all of this mapped out in a structure I could parse into a Visualforce page when I did this originally a couple of years ago.
You'll want to play with the API to see what information you get back, especially being wary of composite fields, because they have an interesting behavior (composite fields being those with more than one sub-component, like some Name fields, address fields, geolocation fields, etc).
Once you get all this data, you can construct SOQL statements from the results, render a page, etc.
This describe includes everything you could want to know about the layout, including the read-only/editable status of the field, if it can be created/updated (some fields are only valid on create, for example), the data type, precision, scale, and so on of the layout being described.