That easy to answer for Irish, a bit more complicated for Scottish Gaelic.
The acute accent is called a fada and literally means "long," so it does just what you think, lengthens the vowel.
Most of the time in Scottish Gaelic the grave accent does the same thing and people use the direction of the accent as a lazy way to tell the languages apart at a glace. However, there are two schools of thought on the matter, especially as unlike Irish there is no standardised form of spelling. The "traditionalist" Scottish Gaelic school of thought is that the direction of the accent differentiates between "open and closed" long vowels in the middle of words. The progressivist school of thought takes the pessimistic (but probably true) view that learners outnumber native speakers and that few learners will ever develop the nuance to differentiate so one may as well stick to one accent only and solely use the grave as it's dominant already.
I should add the Scottish Gaelic requires a more subtle ear. It's retained more sounds than modern Irish, maybe because the learned Gaelic aristocracy lasted longer. In some dialects there are four ways to pronounce the letter L and that's one that doesn't take mutations! You'll also see more accents in Irish in general and more silent letters of the gh, dh variety in Scottish Gaelic because reformed modern Irish deleted a lot of the silent consonants but signaled the sound changes made by them with a fada instead. It would be like taking the word "right" in English and changing the spelling to "rít." It makes it look tidier but it's a real bugger sometimes as the missing letters are a huge hint in how to decline verb or conjugate a noun so you have to memorise them instead unless you were lucky enough to learn that word orally as a child.
So you get rí in Irish and righ in Gaelic for "king," both pronounced the same.
Is that clear as mud now?