Can I buy iOS apps on a computer, and then gift them to the end user?
You can’t gift iOS apps from your computer. You can do simply from an iPhone or iPad that supports iOS. 

However, another alternative that you can use is:


Apple Business Manager and MDM Tool.


Once you purchase the license for the app/tool, you can push it for the user from MDM Tool which will synchronize with ABM. ABM is free but should be associated with the company with valid registration from the Apple support team and you need to purchase the MDM tool for it. You can deploy on-premises or in the cloud. This is a solution for big corporate companies who want to have a proper inventory of their Apple Devices too. 

Just a reference to show you how ABM Apps distribution looks like: 



Note: The above solution is expensive and needs a proper plan. So an easy way to gift will be to use one iOS device quickly and push it as a gift for a desired user once you purchase it. Check this detail: https://support.apple.com/en-us/HT201783