Getting to the Palace of Holyroodhouse by public transport
The nearest train station is Edinburgh Waverley Train Station (about 15 minutes away though!). My advice if arriving at Edinburgh Waverley would be to take a wheelchair accessible taxi, from the taxi rank at the station, to Holyrood Palace (or even up the hill to Edinburgh Castle - see the Edinburgh Royal Mile DIY Walking Tour info).
If you do decide to walk (or be pushed) though, which is definitely possible, then I would recommend leaving Edinburgh Waverley Station via the two wheelchair accessible lifts which take you towards Waverley Market (the opposite direction!), turning right onto Princes Street, then again turning right onto North Bridge, and crossing the bridge. Then turn left (into High Street) and trundle down the hill to the Palace of Holyroodhouse (alternatively, and if you want to follow the Edinburgh Royal Mile DIY Walking Tour, turn right into High Street, trundle up to Edinburgh Castle from there - and start the Edinburgh Royal Mile DIY Walking Tour after visiting Edinburgh Castle).
This may seem like a circuitous route. But the two lifts at Edinburgh Waverley, and the roundabout route, minimise the gradient.
Trams & Buses:
These also arrive near Waverley Market on Princes Street, so simply follow the directions above too (the bit from Princes Street to the Palace of Holyroodhouse - or to Edinburgh Castle and the subsequent Edinburgh Royal Mile DIY Walking Tour).