Recommendation letter sent from non-institutional email
I use my gmail, but gmail has the capability to manage the sender addresses. You should authenticate your gmail to send from your institutional address. The recipient will then have the confirmation that you are indeed who you say you are, as gmail will have already done the authentication.
The authenticator in gmail has the ability to either use the SMTP server of your institution to send (if your systems team permits it), where gmail is then acting as the mail client, or it can use the From
headers to indicate your authenticated affiliation.
If you were doing it properly you could manage all your email through the gmail account and choose whichever outgoing account and sending method you choose. This is what I do, for the several academic institutional affiliations I possess.
So in summary: you can have it both ways. You can use gmail for official institutional correspondence and you can use the options provided in gmail to choose which of your attributions any particular email uses. It is appropriate to badge emails for official correspondence, such as letters of recommendation, with your institutional addresses. I would suggest not using a personal email addresses for business purposes, but using the tools properly you can customise your environment in a professional manner.
For other purpose, I recently try to confirm that some professor X was indeed employed by University Y. This search taught me that some universities do not have directories for their faculty member or any other way to confirm online that professor X is a real researcher.
For this reason, I would strongly suggest to use your institutional email, in case there is doubt about your affiliation or existence.
You don't say what the recommendation letter is for, but it's generally not a big deal for academic letters in my experience. For industry letters, many businesses also use gmail, so it will probably not be looked on too strangely there either.
However, a plain text letter from gmail does look less professional than a one on official letterhead, so you might use your department letterhead. If you want to use gmail, you can also cc a copy of the letter to your instituional address to "certify" that you are who you claim to be.